mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-10 09:36:35 +02:00
Persisting original styles of the passed element (built files).
This commit is contained in:
parent
8e8df3e455
commit
c04f637a3f
8
assets/scripts/dist/choices.js
vendored
8
assets/scripts/dist/choices.js
vendored
|
@ -351,7 +351,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
// Reinstate passed element
|
||||
this.passedElement.classList.remove(this.config.classNames.input, this.config.classNames.hiddenState);
|
||||
this.passedElement.removeAttribute('tabindex');
|
||||
this.passedElement.removeAttribute('style');
|
||||
// restore original styles if any
|
||||
this.passedElement.setAttribute('style', this.passedElement.getAttribute('data-choices-js-orig-style'));
|
||||
this.passedElement.removeAttribute('data-choices-js-orig-style');
|
||||
this.passedElement.removeAttribute('aria-hidden');
|
||||
this.passedElement.removeAttribute('data-choice');
|
||||
|
||||
|
@ -1154,7 +1156,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
|
||||
/**
|
||||
* Populate options via ajax callback
|
||||
* @param {Function} fn Passed
|
||||
* @param {Function} fn Function that actually makes an AJAX request
|
||||
* @return {Object} Class instance
|
||||
* @public
|
||||
*/
|
||||
|
@ -2617,6 +2619,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||
this.passedElement.classList.add(this.config.classNames.input, this.config.classNames.hiddenState);
|
||||
|
||||
this.passedElement.tabIndex = '-1';
|
||||
// persist original styles if any
|
||||
this.passedElement.setAttribute('data-choices-js-orig-style', this.passedElement.getAttribute('style'));
|
||||
this.passedElement.setAttribute('style', 'display:none;');
|
||||
this.passedElement.setAttribute('aria-hidden', 'true');
|
||||
this.passedElement.setAttribute('data-choice', 'active');
|
||||
|
|
2
assets/scripts/dist/choices.js.map
vendored
2
assets/scripts/dist/choices.js.map
vendored
File diff suppressed because one or more lines are too long
6
assets/scripts/dist/choices.min.js
vendored
6
assets/scripts/dist/choices.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue