mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-02-02 21:04: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() {
|
addFormGroupFocus() {
|
||||||
|
if (!this.$element.prop('disabled')) {
|
||||||
this.$mdbFormGroup.addClass(ClassName.IS_FOCUSED)
|
this.$mdbFormGroup.addClass(ClassName.IS_FOCUSED)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
removeFormGroupFocus() {
|
removeFormGroupFocus() {
|
||||||
this.$mdbFormGroup.removeClass(ClassName.IS_FOCUSED)
|
this.$mdbFormGroup.removeClass(ClassName.IS_FOCUSED)
|
||||||
|
|
|
@ -50,7 +50,7 @@ const BaseToggle = (($) => {
|
||||||
|
|
||||||
addFocusListener() {
|
addFocusListener() {
|
||||||
// checkboxes didn't appear to bubble to the document, so we'll bind these directly
|
// 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.addFormGroupFocus()
|
||||||
}, () => {
|
}, () => {
|
||||||
this.removeFormGroupFocus()
|
this.removeFormGroupFocus()
|
||||||
|
|
|
@ -48,7 +48,7 @@ const Ripples = (($) => {
|
||||||
constructor($element, config) {
|
constructor($element, config) {
|
||||||
this.$element = $element
|
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)
|
this.config = $.extend({}, Default, config)
|
||||||
|
|
||||||
// attach initial listener
|
// attach initial listener
|
||||||
|
|
|
@ -8,6 +8,11 @@
|
||||||
&:focus {
|
&:focus {
|
||||||
color: $mdb-label-color-toggle-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