#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,7 +139,9 @@ const BaseInput = (($) => {
}
addFormGroupFocus() {
this.$mdbFormGroup.addClass(ClassName.IS_FOCUSED)
if (!this.$element.prop('disabled')) {
this.$mdbFormGroup.addClass(ClassName.IS_FOCUSED)
}
}
removeFormGroupFocus() {

View File

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

View File

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

View File

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