From 3ca5a8a85ebc2853b53dd0ca43578cdae37f2a97 Mon Sep 17 00:00:00 2001 From: zachleat Date: Tue, 27 Dec 2011 13:47:59 -0600 Subject: [PATCH] Per @toddparker's comment, added boxshadow to link buttons. Also changed focus class on sliders to add to the handle, while excluding the toggle switch. --- css/themes/default/jquery.mobile.theme.css | 10 ++++++++-- js/jquery.mobile.forms.slider.js | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/css/themes/default/jquery.mobile.theme.css b/css/themes/default/jquery.mobile.theme.css index 1519fb74..e4adb8ba 100644 --- a/css/themes/default/jquery.mobile.theme.css +++ b/css/themes/default/jquery.mobile.theme.css @@ -1128,7 +1128,12 @@ a.ui-link-inherit { /* Focus state - set here for specificity -----------------------------------------------------------------------------------------------------------*/ -.ui-focus { +.ui-btn:focus { + outline: 0; +} + +.ui-focus, +.ui-btn:focus { -moz-box-shadow: 0px 0px 12px #387bbe /*{global-active-background-color}*/; -webkit-box-shadow: 0px 0px 12px #387bbe /*{global-active-background-color}*/; box-shadow: 0px 0px 12px #387bbe /*{global-active-background-color}*/; @@ -1144,6 +1149,7 @@ a.ui-link-inherit { } /* ...and bring back focus */ -.ui-mobile-nosupport-boxshadow .ui-focus { +.ui-mobile-nosupport-boxshadow .ui-focus, +.ui-mobile-nosupport-boxshadow .ui-btn:focus { outline-width: 2px; } diff --git a/js/jquery.mobile.forms.slider.js b/js/jquery.mobile.forms.slider.js index f51881e9..9a720694 100644 --- a/js/jquery.mobile.forms.slider.js +++ b/js/jquery.mobile.forms.slider.js @@ -186,11 +186,11 @@ $.widget( "mobile.slider", $.mobile.widget, { // NOTE force focus on handle this.handle.bind({ focus: function() { - slider.addClass( $.mobile.focusClass ); + ( cType == 'select' ? slider : $( this ) ).addClass( $.mobile.focusClass ); }, blur: function() { - slider.removeClass( $.mobile.focusClass ); + ( cType == 'select' ? slider : $( this ) ).removeClass( $.mobile.focusClass ); }, vmousedown: function() {