Skip to main content

Search and Top Navigation

#7788 closed bug (fixed)

Opened October 13, 2011 05:14PM UTC

Closed October 13, 2011 05:24PM UTC

Last modified October 05, 2012 08:12PM UTC

Incorrect selector in Autocomplete unit tests

Reported by: dmethvin Owned by:
Priority: minor Milestone: git
Component: ui.autocomplete Version: git (not yet released)
Keywords: Cc:
Blocked by: Blocking:
Description

The autocomplete_options.js test for autoFocus has this selector:

 equal( element.autocomplete( "widget" ).children( ".ui-menu-item:first .ui-state-focus" ).length,

Normally the selector for .children() is evaluated right-to-left and would be anchored on the child; no child has the ui-state-focus class (the a below it does). A positional selector bug was fixed in Sizzle for 1.7 that makes this selector no longer match, which is the correct behavior. http://jsfiddle.net/dmethvin/gGFrr/

Attachments (0)
Change History (3)

Changed October 13, 2011 05:24PM UTC by Dave Methvin comment:1

resolution: → fixed
status: newclosed

Autocomplete tests: Fix #7788, incorrect selector in autoFocus test.

jQuery 1.7 fixed a bug with positional selectors that exposed the incorrect use of .children() here.

Changeset: 9b3ada43d3a41f4cd5ae9e62d1131170d9686af6

Changed October 13, 2011 05:24PM UTC by Scott González comment:2

Merge pull request #497 from dmethvin/fix-7788-ui-autocomplete

Autocomplete tests: Fix #7788, incorrect selector in autoFocus test.

Changeset: ae96ef7754caf05de7025e0ffe24f5af652747b5

Changed October 05, 2012 08:12PM UTC by scottgonzalez comment:3

milestone: 1.9.0git