From: Scott González Date: Sun, 31 May 2009 12:19:20 +0000 (+0000) Subject: Dialog Modal Form Demo: Added ui-state-focus class on focus (fixes #4568 - Demo:... X-Git-Tag: 1.8a1~108 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=140ca4804e22629d614124f34aad86fe589fc48d;p=jquery-ui.git Dialog Modal Form Demo: Added ui-state-focus class on focus (fixes #4568 - Demo: Dialog modal form demo doesn't react to focus on button). --- diff --git a/demos/dialog/modal-form.html b/demos/dialog/modal-form.html index 508c73826..da95b1278 100644 --- a/demos/dialog/modal-form.html +++ b/demos/dialog/modal-form.html @@ -106,16 +106,23 @@ $('#dialog').dialog('open'); }) .hover( - function(){ - $(this).addClass("ui-state-hover"); + function() { + $(this).addClass("ui-state-hover"); }, - function(){ - $(this).removeClass("ui-state-hover"); + function() { + $(this).removeClass("ui-state-hover"); } - ).mousedown(function(){ - $(this).addClass("ui-state-active"); + ) + .focus(function() { + $(this).addClass('ui-state-focus'); }) - .mouseup(function(){ + .blur(function() { + $(this).removeClass('ui-state-focus'); + }) + .mousedown(function() { + $(this).addClass("ui-state-active"); + }) + .mouseup(function() { $(this).removeClass("ui-state-active"); });