From 3e370a44679da9c2b226d1667f13667f23bd239c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 24 Jan 2011 21:58:40 -0500 Subject: [PATCH] Dialog: Use ._focusable() and ._hoverable(). --- ui/jquery.ui.dialog.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 5d18b9b21..0183dd801 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -125,20 +125,6 @@ $.widget("ui.dialog", { uiDialogTitlebarClose = $( "" ) .addClass( "ui-dialog-titlebar-close ui-corner-all" ) .attr( "role", "button" ) - .hover( - function() { - uiDialogTitlebarClose.addClass( "ui-state-hover" ); - }, - function() { - uiDialogTitlebarClose.removeClass( "ui-state-hover" ); - } - ) - .focus(function() { - uiDialogTitlebarClose.addClass( "ui-state-focus" ); - }) - .blur(function() { - uiDialogTitlebarClose.removeClass( "ui-state-focus" ); - }) .click(function( event ) { event.preventDefault(); self.close( event ); @@ -157,6 +143,8 @@ $.widget("ui.dialog", { .prependTo( uiDialogTitlebar ); uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection(); + this._hoverable( uiDialogTitlebarClose ); + this._focusable( uiDialogTitlebarClose ); if ( options.draggable && $.fn.draggable ) { self._makeDraggable(); -- 2.39.5