mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Selectmenu: added a temp fix for Safari to make unit test work, see https://github.com/jquery/jquery-ui/pull/492#issuecomment-4214604
This commit is contained in:
parent
b1a72e6e04
commit
72c17f0614
@ -60,8 +60,8 @@ $.each([
|
||||
equals( element.find("option:selected").val(), selected.next("option").val() , "after keydown original select state" );
|
||||
equals( button.text(), selected.next("option").text(), "after keydown button text" );
|
||||
|
||||
button.simulate( "click" );
|
||||
menu.find("a").last().simulate( "mouseover" ).trigger( "click" );
|
||||
button.simulate( "click", { clientX: 1, clientY: 1 } );
|
||||
menu.find("a").last().simulate( "mouseover", { clientX: 1, clientY: 1 } ).trigger( "click" );
|
||||
equals( menu.attr("aria-activedescendant"), links.eq(element[0].selectedIndex).attr("id"), "after click menu aria-activedescendant" );
|
||||
equals( links.eq(element[0].selectedIndex).attr("aria-selected"), "true", "after click selected menu link aria-selected" );
|
||||
equals( element.find("option:selected").val(), element.find("option").last().val(), "after click original select state" );
|
||||
|
@ -23,8 +23,8 @@ test("change", function () {
|
||||
menu = this.element.selectmenu("menuWidget").parent(),
|
||||
value = this.element.find("option").first().text();
|
||||
|
||||
button.find("a").simulate( "focus" ).simulate( "click" );
|
||||
menu.find("a").first().simulate( "mouseover" ).trigger( "click" );
|
||||
button.find("a").simulate( "focus" ).simulate( "click", { clientX: 1, clientY: 1 } );
|
||||
menu.find("a").first().simulate( "mouseover", { clientX: 1, clientY: 1 } ).trigger( "click" );
|
||||
});
|
||||
|
||||
|
||||
@ -63,8 +63,8 @@ test("focus", function () {
|
||||
var button = this.element.selectmenu("widget").parent(),
|
||||
menu = this.element.selectmenu("menuWidget").parent();
|
||||
|
||||
button.find("a").simulate( "focus" ).simulate( "click" );
|
||||
menu.find(".ui-menu-item").simulate("mouseover");
|
||||
button.find("a").simulate( "focus" ).simulate( "click", { clientX: 1, clientY: 1 } );
|
||||
menu.find(".ui-menu-item").simulate("mouseover", { clientX: 1, clientY: 1 });
|
||||
});
|
||||
|
||||
|
||||
@ -98,8 +98,8 @@ test("select", function () {
|
||||
var button = this.element.selectmenu("widget").parent(),
|
||||
menu = this.element.selectmenu("menuWidget").parent();
|
||||
|
||||
button.find("a").simulate( "focus" ).simulate( "click" );
|
||||
menu.find("a").first().simulate( "mouseover" ).trigger("click");
|
||||
button.find("a").simulate( "focus" ).simulate( "click", { clientX: 1, clientY: 1 } );
|
||||
menu.find("a").first().simulate( "mouseover", { clientX: 1, clientY: 1 } ).trigger("click");
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
Loading…
Reference in New Issue
Block a user