diff --git a/src/definitions/modules/checkbox.js b/src/definitions/modules/checkbox.js index 738bf9427..49e1786b7 100644 --- a/src/definitions/modules/checkbox.js +++ b/src/definitions/modules/checkbox.js @@ -78,13 +78,11 @@ $.fn.checkbox = function(parameters) { destroy: function() { module.verbose('Destroying module'); module.unbind.events(); - $module - .removeData(moduleNamespace) - ; + module.show.input(); + $module.removeData(moduleNamespace); }, fix: { - reference: function() { if( $module.is(selector.input) ) { module.debug('Behavior called on adjusting invoked element'); @@ -128,10 +126,16 @@ $.fn.checkbox = function(parameters) { hide: { input: function() { - module.verbose('Modfying z-index'); + module.verbose('Modfying z-index to be unselectable'); $input.addClass(className.hidden); } }, + show: { + input: function() { + module.verbose('Modfying z-index to be selectable'); + $input.removeClass(className.hidden); + } + }, observeChanges: function() { if('MutationObserver' in window) { diff --git a/src/definitions/modules/checkbox.less b/src/definitions/modules/checkbox.less index cd4e768c4..c076057de 100755 --- a/src/definitions/modules/checkbox.less +++ b/src/definitions/modules/checkbox.less @@ -60,9 +60,9 @@ .ui.checkbox .box, .ui.checkbox label { + cursor: auto; position: relative; display: block; - cursor: pointer; padding-left: @labelDistance; outline: none; } @@ -115,10 +115,8 @@ /* Inside */ .ui.checkbox label, .ui.checkbox + label { - cursor: pointer; color: @labelColor; transition: @labelTransition; - user-select: none; } /* Outside */ @@ -263,6 +261,14 @@ z-index: -1; } +/* Selectable Label */ +.ui.checkbox input[type="checkbox"].hidden + label, +.ui.checkbox input[type="radio"].hidden + label { + cursor: pointer; + user-select: none; +} + + /*******************************