aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.tooltip.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.tooltip.js')
-rw-r--r--ui/jquery.ui.tooltip.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
index f19061bc3..5e32459fc 100644
--- a/ui/jquery.ui.tooltip.js
+++ b/ui/jquery.ui.tooltip.js
@@ -148,7 +148,14 @@ $.widget( "ui.tooltip", {
this._bind( target, {
mouseleave: "close",
- blur: "close"
+ blur: "close",
+ keyup: function( event ) {
+ if ( event.keyCode == $.ui.keyCode.ESCAPE ) {
+ var fakeEvent = $.Event(event);
+ fakeEvent.currentTarget = target[0];
+ this.close( fakeEvent, true );
+ }
+ }
});
},
@@ -176,7 +183,7 @@ $.widget( "ui.tooltip", {
delete that.tooltips[ this.id ];
});
- target.unbind( "mouseleave.tooltip blur.tooltip" );
+ target.unbind( "mouseleave.tooltip blur.tooltip keyup.tooltip" );
this._trigger( "close", event, { tooltip: tooltip } );
},