#774 is-focused is not checking disabled on inputs

This commit is contained in:
Kevin Ross 2015-12-09 13:13:55 -06:00
parent f75800e7be
commit 1ed294899c
4 changed files with 10 additions and 3 deletions

View File

@ -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)

View File

@ -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()

View File

@ -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

View File

@ -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;
}
} }
} }