diff options
| author | Mark Otto <[email protected]> | 2020-10-27 20:45:48 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-10-27 20:45:48 -0700 |
| commit | 3e2f9ab237e0e338fbe497213ad2353e59fbee9c (patch) | |
| tree | d1f1843ce62f3c5754e46f0df8eceb4d67a9b72d /js/dist/dropdown.js | |
| parent | 582f52e9e147c5386d07f241a74a185175cc461d (diff) | |
| download | bootstrap-3e2f9ab237e0e338fbe497213ad2353e59fbee9c.tar.xz bootstrap-3e2f9ab237e0e338fbe497213ad2353e59fbee9c.zip | |
v5: Floating labels (#30449)
* v5: Promote floating labels example to component
- Adds new .form-floating
- Stubs out basics of a docs page
- Removes existing Example
* Update floating labels to support .form-select, make inputs and selects more consistent
- To do this, I made the .form-control and .form-select consistent in min-height vs height
- Removed some unused variables now
- Updated -color to be the -color because I don't know why this was any different before
- Update page to include some examples for layout, validation, and value
- Rewrite styles to not modify padding, but instead transform and opacity
* Streamline and bulletproof some things
- Apply some optimizations from code review
- Removed unecessary properties from the label
- Add some comments for what properties are required
- Move from fixed height for labels to height 100% so we can support textareas
- Improve docs a little bit, add ToC
* Move some values to variables, switch from scaling font-size to scale, update transforms
* Bring over changes from #30966 and add to them to tighten things up
* Delete the now unused example images
* Fix typo
* Allowlist the calc function
* Add transform-origin, update transform values
* Test out autofill fix
* Fix linter issue
* Mention it in the migration guide
* Bump bundlesize
* Add one more variable per review
* Shave .25rem off the height
Co-authored-by: XhmikosR <[email protected]>
Diffstat (limited to 'js/dist/dropdown.js')
| -rw-r--r-- | js/dist/dropdown.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/js/dist/dropdown.js b/js/dist/dropdown.js index 01793ca3d..ad87ed854 100644 --- a/js/dist/dropdown.js +++ b/js/dist/dropdown.js @@ -258,8 +258,10 @@ this._element.setAttribute('aria-expanded', true); - Manipulator__default['default'].toggleClass(this._menu, CLASS_NAME_SHOW); - Manipulator__default['default'].toggleClass(this._element, CLASS_NAME_SHOW); + this._menu.classList.toggle(CLASS_NAME_SHOW); + + this._element.classList.toggle(CLASS_NAME_SHOW); + EventHandler__default['default'].trigger(parent, EVENT_SHOWN, relatedTarget); }; @@ -282,8 +284,10 @@ this._popper.destroy(); } - Manipulator__default['default'].toggleClass(this._menu, CLASS_NAME_SHOW); - Manipulator__default['default'].toggleClass(this._element, CLASS_NAME_SHOW); + this._menu.classList.toggle(CLASS_NAME_SHOW); + + this._element.classList.toggle(CLASS_NAME_SHOW); + EventHandler__default['default'].trigger(parent, EVENT_HIDDEN, relatedTarget); }; |
