From 140ca4804e22629d614124f34aad86fe589fc48d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Sun, 31 May 2009 12:19:20 +0000 Subject: [PATCH] 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). --- demos/dialog/modal-form.html | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) 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"); }); -- 2.39.5