Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#7788 closed bug (fixed)

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/

Change History (3)

comment:1 Changed 8 years ago by Dave Methvin

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

comment:2 Changed 8 years ago by Scott González

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

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

Changeset: ae96ef7754caf05de7025e0ffe24f5af652747b5

comment:3 Changed 7 years ago by Scott González

Milestone: 1.9.0git
Note: See TracTickets for help on using tickets.