mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-10 19:57:13 +03:00
#774 is-focused is not checking disabled on inputs
This commit is contained in:
parent
f75800e7be
commit
1ed294899c
|
@ -139,8 +139,10 @@ const BaseInput = (($) => {
|
|||
}
|
||||
|
||||
addFormGroupFocus() {
|
||||
if (!this.$element.prop('disabled')) {
|
||||
this.$mdbFormGroup.addClass(ClassName.IS_FOCUSED)
|
||||
}
|
||||
}
|
||||
|
||||
removeFormGroupFocus() {
|
||||
this.$mdbFormGroup.removeClass(ClassName.IS_FOCUSED)
|
||||
|
|
|
@ -50,7 +50,7 @@ const BaseToggle = (($) => {
|
|||
|
||||
addFocusListener() {
|
||||
// checkboxes didn't appear to bubble to the document, so we'll bind these directly
|
||||
this.$mdbFormGroup.find(Selector.LABEL).hover(() => {
|
||||
this.$element.closest(Selector.LABEL).hover(() => {
|
||||
this.addFormGroupFocus()
|
||||
}, () => {
|
||||
this.removeFormGroupFocus()
|
||||
|
|
|
@ -48,7 +48,7 @@ const Ripples = (($) => {
|
|||
constructor($element, config) {
|
||||
this.$element = $element
|
||||
|
||||
console.log(`Adding ripples to ${Util.describe(this.$element)}`) // eslint-disable-line no-console
|
||||
//console.log(`Adding ripples to ${Util.describe(this.$element)}`) // eslint-disable-line no-console
|
||||
this.config = $.extend({}, Default, config)
|
||||
|
||||
// attach initial listener
|
||||
|
|
|
@ -8,6 +8,11 @@
|
|||
&:focus {
|
||||
color: $mdb-label-color-toggle-focus;
|
||||
}
|
||||
|
||||
// correct the above focus color for disabled items
|
||||
fieldset[disabled] & {
|
||||
color: $mdb-label-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user