mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Button tests: Work around a quirk in Opera.
This commit is contained in:
parent
37ea734182
commit
948f874266
@ -92,7 +92,7 @@ test("buttonset (rtl)", function() {
|
|||||||
// remove this when simulate properly simulates this
|
// remove this when simulate properly simulates this
|
||||||
// see http://yuilibrary.com/projects/yui2/ticket/2528826 fore more info
|
// see http://yuilibrary.com/projects/yui2/ticket/2528826 fore more info
|
||||||
if ( !$.ui.ie || ( document.documentMode && document.documentMode > 8 ) ) {
|
if ( !$.ui.ie || ( document.documentMode && document.documentMode > 8 ) ) {
|
||||||
test( "ensure checked and aria after single click on checkbox label button, see #5518", function() {
|
asyncTest( "ensure checked and aria after single click on checkbox label button, see #5518", function() {
|
||||||
expect( 3 );
|
expect( 3 );
|
||||||
|
|
||||||
$("#check2").button().change( function() {
|
$("#check2").button().change( function() {
|
||||||
@ -100,7 +100,16 @@ if ( !$.ui.ie || ( document.documentMode && document.documentMode > 8 ) ) {
|
|||||||
ok( this.checked, "checked ok" );
|
ok( this.checked, "checked ok" );
|
||||||
ok( lbl.attr("aria-pressed") === "true", "aria ok" );
|
ok( lbl.attr("aria-pressed") === "true", "aria ok" );
|
||||||
ok( lbl.hasClass("ui-state-active"), "ui-state-active ok" );
|
ok( lbl.hasClass("ui-state-active"), "ui-state-active ok" );
|
||||||
}).button("widget").simulate("mousedown").simulate("click").simulate("mouseup");
|
});
|
||||||
|
|
||||||
|
// support: Opera
|
||||||
|
// Opera doesn't trigger a change event when this is done synchronously.
|
||||||
|
// This seems to be a side effect of another test, but until that can be
|
||||||
|
// tracked down, this delay will have to do.
|
||||||
|
setTimeout(function() {
|
||||||
|
$("#check2").button("widget").simulate("click");
|
||||||
|
start();
|
||||||
|
}, 1 );
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user