Skip to content
Permalink
Browse files

Dialog: Use ._focusable() and ._hoverable().

  • Loading branch information
scottgonzalez committed Jan 25, 2011
1 parent 0ef4b4f commit 3e370a44679da9c2b226d1667f13667f23bd239c
Showing with 2 additions and 14 deletions.
  1. +2 −14 ui/jquery.ui.dialog.js
@@ -125,20 +125,6 @@ $.widget("ui.dialog", {
uiDialogTitlebarClose = $( "<a href='#'></a>" )
.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();

0 comments on commit 3e370a4

Please sign in to comment.
You can’t perform that action at this time.