diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2011-04-13 18:37:32 +0200 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2011-04-13 18:37:32 +0200 |
commit | 00559b388af76424878413cedcebee49e0a8c67e (patch) | |
tree | dcdc22f0cdda89db207c90102a35925202f5d9a8 | |
parent | 67d49f593bb34f10751421a51c8e13d42bc1b16e (diff) | |
download | jquery-ui-00559b388af76424878413cedcebee49e0a8c67e.tar.gz jquery-ui-00559b388af76424878413cedcebee49e0a8c67e.zip |
Update popup utility: Defer _open call and let click event propagate.
Fixes other popups to close. Also update aria usage.
-rw-r--r-- | tests/visual/menu/popup.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/visual/menu/popup.js b/tests/visual/menu/popup.js index dea1452e0..2cd4ee047 100644 --- a/tests/visual/menu/popup.js +++ b/tests/visual/menu/popup.js @@ -29,7 +29,7 @@ $.widget( "ui.popup", { } this.options.trigger - .attr( "aria-haspop", true ) + .attr( "aria-haspopup", true ) .attr( "aria-owns", this.element.attr( "id" ) ); this.element @@ -38,9 +38,11 @@ $.widget( "ui.popup", { this._bind(this.options.trigger, { click: function( event ) { - event.stopPropagation(); event.preventDefault(); - this._open( event ); + var that = this; + setTimeout(function() { + that._open( event ); + }, 1); } }); @@ -68,6 +70,10 @@ $.widget( "ui.popup", { .removeClass( "ui-popup" ) .removeAttr( "aria-hidden" ) .removeAttr( "aria-expanded" ); + + this.options.trigger + .removeAttr( "aria-haspopup" ) + .removeAttr( "aria-owns" ); if ( this.generatedId ) { this.element.removeAttr( "id" ); |