0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-03 15:24:19 +01:00
Commit Graph

793 Commits

Author SHA1 Message Date
GeoSot
928bdcadc5 Carousel: make direct triggering of slid event, instead of using a callback 2022-02-19 14:52:36 +02:00
GeoSot
d97125475b Carousel: merge slide functionality, regardless of whether it is animated or not 2022-02-19 14:52:36 +02:00
GeoSot
a247fe9b27 Carousel: simplify initialization on document load, using getOrCreateInstance 2022-02-19 14:52:36 +02:00
GeoSot
ccba6a3589 Carousel: remove redundant config merge on dataApiClickHandler, as it is done by default in the constructor 2022-02-19 14:52:36 +02:00
Anton
a805330f63
Optimize jQueryInterface in Collapse (#35689)
extracts config initialization from cycle
2022-02-07 10:50:26 +02:00
XhmikosR
cf7fec8a2e event-handler.js: remove unneeded return statement 2022-02-01 12:43:19 +02:00
GeoSot
a1e924c4da Event-handler: use Array.find instead of for 2022-02-01 12:43:19 +02:00
GeoSot
fc7c5fcb7a Event-handler: initialize variable properly 2022-02-01 12:43:19 +02:00
GeoSot
c44d99f55c Dropdown: use destructured variables in dataApyKeydownHandler 2022-02-01 08:58:46 +02:00
GeoSot
c14fc989df Dropdown: dropdown doesn't document data-bs-target option & parentNode is ALWAYS the wrapper for toggle & menu 2022-02-01 08:58:46 +02:00
GeoSot
d105439235 Dropdown: merge instance identification in dataApiKeydownHandler
As we use the `dataApiKeydownHandler` only for events that are triggered on `[data-bs-toggle="dropdown"]` or on `.dropdown-menu`, we can ensure that their `parentNode` will ALWAYS be the `.dropdown` wrapper
2022-02-01 08:58:46 +02:00
GeoSot
7f04f84bf8 Dropdown: use only one check for shown state 2022-01-30 18:01:09 +02:00
GeoSot
5f1c542d67 Dropdown: get dropdown's parent in one place 2022-01-30 18:01:09 +02:00
GeoSot
74f24cdf24
More tooltip refactoring (#35546)
* Tooltip.js: move `shown` check to method

* Tooltip.js: move Popper's creation to method

* Tooltip.js: merge checks before `hide`

* Tooltip.js: minor refactoring on `toggle` method
2022-01-30 17:39:03 +02:00
GeoSot
882185bbde
Change selector-engine.js parents method to utilize better js native methods (#35684)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2022-01-30 16:24:03 +02:00
GeoSot
28c9002573 Modal: handle click event from backdrop callback 2022-01-30 15:39:34 +02:00
GeoSot
d092817059 Event handler: merge new Event with new CustomEvent 2022-01-30 14:15:17 +02:00
GeoSot
fa93995123 Event handler: replace deprecated initEvent 2022-01-30 14:15:17 +02:00
XhmikosR
0840105d7f SelectorEngine: remove moot space 2022-01-29 13:25:30 +02:00
XhmikosR
558002f3dc Return early in more places 2022-01-29 13:25:30 +02:00
XhmikosR
7d3bc44bb0 dropdown: Move constant 2022-01-29 13:25:30 +02:00
GeoSot
a8887ea8a8 collapse: merge class toggling 2022-01-29 13:25:30 +02:00
XhmikosR
b5147ec218 event-handler.js: use for...of 2022-01-29 13:25:30 +02:00
XhmikosR
62d86c07f8 Rename variables 2022-01-29 13:25:30 +02:00
XhmikosR
3ac4451d47 backdrop.js: cache _getElement calls 2022-01-29 13:25:30 +02:00
XhmikosR
0c3dfe104b Remove a few unneeded variables 2022-01-29 13:25:30 +02:00
Ryan Berliner
14c7dc1e88
Fix: isVisible function behavior in case of a <details> element, on chrome 97 (#35682) 2022-01-13 10:55:05 +02:00
Patrick H. Lauke
0d054bb0f1
Remove explicit use of aria-hidden for offcanvas when closed (#35589)
Remove explicit use of aria-hidden & visibility for offcanvas when closed, handling it with css

Co-authored-by: GeoSot <geo.sotis@gmail.com>
Co-authored-by: Gaël Poupard <ffoodd@users.noreply.github.com>
2022-01-05 19:20:15 +02:00
GeoSot
0d4213bde3 Carousel: move repeated code to a method 2021-12-21 17:37:24 +02:00
GeoSot
b8ee68cfa0 Carousel: remove always true visibilityState check
According to https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilityState `visibilityState` is always a string, so the check was always true
2021-12-21 17:37:24 +02:00
GeoSot
ff4bf4a458 Carousel: move carousel default interval to _getConfig() and simplify it 2021-12-21 17:37:24 +02:00
GeoSot
6f79721c82 Carousel: return early and drop a loop.
We can achieve the same thing by querying the specific selector directly
2021-12-21 17:37:24 +02:00
GeoSot
d60f146507 Carousel: add a helper to get the active element 2021-12-21 17:37:24 +02:00
GeoSot
65cf77ae3e
Popover/Tooltip: Fix vertical alignment on arrow of tip elements (#35527)
Regression of #32692

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-21 17:19:29 +02:00
Phil E. Taylor
c2db7108c2
Fix typo in comment (#35564)
s/moddal/modal
2021-12-18 07:58:31 +02:00
GeoSot
e0960b08e0
Tooltip: remove extraneous call to _getConfig() (#35540)
BaseClass already initializes the config

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-15 10:47:32 +02:00
GeoSot
d40fae456e
Popover.js: Accept empty content through data-bs-content (#35514)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-15 10:41:31 +02:00
XhmikosR
cd04fe015f
Scrollspy: minor refactoring (#35512)
* reorder variables
* join lines
* use `filter(Boolean)` since it's clearer
* use `for...of`
2021-12-15 09:38:06 +02:00
GeoSot
886b940796
Extract Component config functionality to a separate class (#33872)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-10 18:18:18 +02:00
XhmikosR
63d38b1974
Tab: minor refactoring (#35511)
* remove unneeded parentheses
* move variable
2021-12-10 07:51:57 +02:00
XhmikosR
871c8bdd3f
util/index.js: minor refactoring (#35510)
* rename variables
* remove an unused variable
* be more explicit
* reuse variable
2021-12-10 07:48:04 +02:00
XhmikosR
eaa801c899
Toast: join multiple classList calls (#35507) 2021-12-10 07:42:08 +02:00
GeoSot
28a5a72ed5
Scrollbar - remove margin/padding properties properly (#35388)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-12-09 15:49:28 +02:00
GeoSot
c376cb0763
Dropdown: fix toggle focus after dropdown is hidden using the ESC button (#35500) 2021-12-09 15:34:17 +02:00
GeoSot
4fd5539c75
ScrollBar.js. Minor refactoring and add test (#35492) 2021-12-09 15:05:50 +02:00
GeoSot
328f723008
Tooltip: remove title attribute before show & add tests (#35456) 2021-12-07 15:51:56 +02:00
GeoSot
385fea49e8 Tooltip/Popover: add underscore prefix to protected functions 2021-12-01 18:00:36 +02:00
GeoSot
bd79d69a73 Tooltip: a simple code-block position change 2021-12-01 18:00:36 +02:00
GeoSot
1f7b83203d Tooltip: simplify popper check 2021-12-01 18:00:36 +02:00
GeoSot
9b9372e8dd Tooltip: refactor _hoverState to Boolean to achieve better control 2021-12-01 18:00:36 +02:00