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

536 Commits

Author SHA1 Message Date
Tanguy Krotoff
d80a9fc553
Fix tooltip when hovering a children element (delegateTarget) (#30928)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-06-18 10:02:44 +03:00
XhmikosR
12b754800c collapse.js: return early. 2020-06-17 16:58:56 +03:00
XhmikosR
8debdf6ce6 Remove a couple of variables used once 2020-06-17 16:58:56 +03:00
XhmikosR
94a5d87e15 Unbreak short lines 2020-06-17 16:58:56 +03:00
Johann-S
088c727a31 data: reword storage key in dom 2020-06-17 15:45:36 +02:00
XhmikosR
c28934cb18
Rename "master" to "main". (#31050) 2020-06-16 21:41:47 +03:00
Martijn Cuppens
1a0a0858ef Remove checkbox/radio toggle from button plugin in favor of a CSS only solution 2020-06-15 19:04:19 -07:00
Rohit Sharma
5faf41eb48
Add role="dialog" in modals via JavaScript (#30936) 2020-06-04 10:35:09 +03:00
XhmikosR
7966167cf6
Replace double tilde with Math.floor (#30691)
Nowadays, browser engines have improved a lot and `Math.floor` is the same, if not faster.
Also, clarity is better than micro-optimizations in this case.
2020-05-14 09:46:42 +03:00
XhmikosR
b07b342086
Partially Revert "Use regex.test() when we want to check for a Boolean. (#29969)" (#30770)
This partially reverts commit 9c2b9ac74d.
2020-05-13 22:49:41 +03:00
XhmikosR
38ec7c4df7
Bump version to 5.0.0-alpha1 (#29925)
Also add v4.5.0 in versions and keep README.md pointing to v4.5.0 so that there are no broken stuff.
2020-05-13 22:36:00 +03:00
Giovanni Mendoza
3e7566f2c3 Avoid bad scrollbar replacement into width values 2020-05-12 07:51:09 +03:00
XhmikosR
737b6925ab Revert "Avoid bad scrollbar replacement into width values (#30690)"
This reverts commit 85c4788ded.
2020-05-06 21:25:59 +02:00
Johann-S
f91788548c
enforce element check on scrollspy target (#30747) 2020-05-06 07:30:43 +03:00
XhmikosR
727e09b641
scrollspy.js: remove temporary variable (#30724) 2020-05-04 19:43:50 +03:00
Johann-S
85c4788ded
Avoid bad scrollbar replacement into width values (#30690) 2020-04-29 22:28:20 +03:00
Martijn Cuppens
c8d68fbec7
Drop closest from SelectorEngine (#30653)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-04-28 22:17:23 +03:00
Tanguy Krotoff
7787f642b9 Fix crash when pressing ArrowUp the first time 2020-04-17 18:22:15 +03:00
Tanguy Krotoff
d7f0f1aac9 Replace event.delegateTarget with event.target
No need for fixEvent() anymore
2020-04-17 18:22:15 +03:00
Tanguy Krotoff
dcd99aa7d1 Replace event.which with event.key and event.button 2020-04-17 18:22:15 +03:00
XhmikosR
8547ab149a
collapse: don't rely on implicit conversion (#30566)
`config` can be an `Object` and we only need to test for `hide` or `show` if it's a `String`
2020-04-17 15:09:51 +03:00
XhmikosR
9a5033d413
Pass multiple classes to classList.add / classList.remove (#30537)
This is supported by our currently supported browsers.
2020-04-09 20:56:43 +03:00
ysds
dfa017adc3 Always modal scroll top to 0 2020-04-01 10:05:43 +03:00
XhmikosR
e1f5d819c7
Remove MSPointerEvent and ms-touch-action in tests (#30463) 2020-03-29 09:59:54 +03:00
XhmikosR
ed94976ea8
Use textContent instead of innerText. (#30462)
It's supported by all of our supported browsers.
2020-03-29 09:53:57 +03:00
Johann-S
26d86fce2a
fix: remove make array util function (#30430) 2020-03-25 16:35:02 +02:00
Martijn Cuppens
2e150e722a Use next dropdown menu instead of first of the parent 2020-03-23 15:35:07 +01:00
Johann-S
47aef7b2c6 Remove IE compatibility JS code 2020-03-18 20:59:27 +02:00
Johann-S
aff115219e
fix: ensure totype always returns stringified null/undefined when null/undefined is passed (#30383) 2020-03-18 13:10:55 +02:00
XhmikosR
38333feda5 Switch to strings constants.
This allows the minifier to mangle the constants. It also allows the linter to find unused strings properly.

While at it, remove a few unused properties.

File                        Before      After       Diff
--------------------------------------------------------
bootstrap.bundle.min.js     23.61 kB    22.61 kB    -1.00 kB (-4.23 %)
bootstrap.min.js            17.04 kB    16.08 kB    -0.96 kB (-5.63 %)
2020-03-18 12:58:54 +02:00
Sparks
c47547cd09
Improvement: harmonize usage of constants (#30285) 2020-03-09 17:26:29 +02:00
Martijn Cuppens
7d8c7c4ba8
prev() function fails when non-element nodes are present (#30117)
The `prev()` function doesn't take nodes other than elements into account. Also we could simplify things a lot using the `previousElementSibling` property. This property isn't fully supported in IE, it only works for elements, but since the `element` variable is an element, we can safely use it here.

I've also added an additional test.

I don't think we had this issue in v4, since we relied on jQuery back then.

Ref. https://developer.mozilla.org/en-US/docs/Web/API/NonDocumentTypeChildNode/nextElementSibling
2020-03-09 17:21:04 +02:00
Giovanni Mendoza
954a0b1e6a Close modal with keyboard=true & backdrop=static (#29986)
* Close modal with keyboard=true & backdrop=static
2020-01-10 11:06:12 +02:00
XhmikosR
5638499aba
sanitizer.js: Add srcset in the allowed attributes (#29968) 2020-01-07 22:46:28 +02:00
XhmikosR
5d1da6377d Fix the new lint errors. 2020-01-07 22:25:50 +02:00
XhmikosR
9c2b9ac74d
Use regex.test() when we want to check for a Boolean. (#29969) 2020-01-07 22:07:51 +02:00
Steffen Roßkamp
c62efc3ef6 Update normalizeDataKey to match the spec (#29609) 2019-10-31 07:58:09 +02:00
Higor Araújo dos Anjos
46912797b2 Added animation when modal backdrop is static (#29516) 2019-10-25 21:12:09 +03:00
Jeremy Jackson
c1ee395f80 Skip hidden dropdowns while focusing (#29523) 2019-10-17 18:01:44 +03:00
XhmikosR
622c914a3a
Update devDependencies. (#29447) 2019-10-07 09:31:12 +03:00
Johann-S
3d12b541c4 return to the original file structure to avoid breaking modularity 2019-10-03 09:55:57 +02:00
XhmikosR
6cb4ebc048
ESLint: specify --report-unused-disable-directives (#29350) 2019-09-02 12:44:19 +03:00
Johann-S
a5cbb5e71a dropdown show method should do the same as toggle 2019-08-25 15:54:22 +02:00
Markus Hatvan
4d101491da Remaining JS linting TODO (#29289)
* Enable and fix all occurrences with no-mixed-operators rule
* Take care of the max-depth warning in button.js

Signed-off-by: mhatvan <markus_hatvan@aon.at>
2019-08-22 22:17:34 +03:00
Johann-S
6885d65578 dropdown - destroy old popper.js references 2019-08-22 20:30:16 +02:00
Johann-S
a9c35b3ca8 Remove useless check for null object with spread operator 2019-08-18 17:19:36 +03:00
XhmikosR
9cee3c2808 Minor wording tweaks 2019-08-18 17:19:36 +03:00
Johann-S
f03c10a189 allow to pass popper.js configuration for tooltip/popover and dropdown 2019-08-18 17:19:36 +03:00
Johann-S
8b2b490f9b add a way to disable jQuery detection 2019-08-02 16:50:05 +02:00
XhmikosR
eecd75db00
Fix typos. (#29178) 2019-07-31 16:14:21 +03:00
Johann-S
dcba526775 remove underscore for static methods 2019-07-29 11:34:12 +02:00
Johann-S
2ea71a9e78 allow dynamic modal body for scrollable modals 2019-07-28 12:11:10 +02:00
Johann-S
fc02932946 use get selector from element only when needed 2019-07-24 11:27:35 +02:00
Johann-S
e48e498bf4 fix arrow popover (#29115) 2019-07-24 10:53:58 +03:00
Shohei Yoshida
ebb1eea520 Force reflow for fade-in animation (#29113) 2019-07-23 17:21:23 +03:00
Johann-S
233f3fb1ce rewrite tab unit tests 2019-07-23 14:23:50 +02:00
Johann-S
e1b5d8471a use qunit css for our fixture 2019-07-23 14:23:50 +02:00
Johann-S
b7b56cb10a rewrite scrollspy unit tests 2019-07-23 14:23:50 +02:00
Johann-S
85b70cef3c rewrite tooltip unit tests 2019-07-23 14:23:50 +02:00
Johann-S
c9e650a56f rewrite popover unit tests 2019-07-23 14:23:50 +02:00
Johann-S
1ac07a66ce rewrite modal unit tests 2019-07-23 14:23:50 +02:00
Anton Bershanskiy
e916a9bc03 rewrite toast unit tests 2019-07-23 14:23:50 +02:00
Johann-S
6a59c58480 rewrite dropdown unit tests 2019-07-23 14:23:50 +02:00
Johann-S
0ed1618c06 rewrite collapse unit tests 2019-07-23 14:23:50 +02:00
Johann-S
62730d9afd rewrite carousel unit tests 2019-07-23 14:23:50 +02:00
Johann-S
747f0f4c7b test jquery interface for our alert plugin 2019-07-23 14:23:50 +02:00
Johann-S
891a187059 rewrite button unit tests 2019-07-23 14:23:50 +02:00
Johann-S
c834895fa0 rewrite unit tests for selector engine 2019-07-23 14:23:50 +02:00
Anton Bershanskiy
fe6ba2384a rewrite manipulator unit tests 2019-07-23 14:23:50 +02:00
Johann-S
c8c2074650 Switch from QUnit to Jasmine. 2019-07-23 14:23:50 +02:00
Patrick H. Lauke
f0f75379f6 Closing dropdown with ESC correctly sets focus to toggle (#28928)
Just firing the focus event isn't enough ... need to actually call the proper `focus()` method for it to actually do it...
2019-06-19 12:23:41 +03:00
david-lallement
0829decce0 tooltip dispose:removing only own event handler (#28896) 2019-06-13 10:42:54 +02:00
XhmikosR
8a79cf894d event-handler.js: use a plain for loop. (#28853) 2019-06-03 13:08:17 +02:00
Johann-S
d5752a18ab toast should allow prevent default for hide and show events 2019-05-16 13:24:29 +02:00
Johann-S
c805aec770 fix popover arrow by selecting the first element child 2019-05-14 15:28:43 +02:00
XhmikosR
438e01b61c Rename eventHandler and selectorEngine files. 2019-05-08 17:26:37 +03:00
XhmikosR
afc63ec887 Fix xo error: use for...of. 2019-04-10 15:18:57 +03:00
ysds
f4877dbf03 Remove _close() and marge with _hide() 2019-04-09 13:59:41 +02:00
ysds
91ebb4b3b2 Call hide() after delay time 2019-04-09 13:59:41 +02:00
Johann-S
1752addadf Reset carousel touch delta x to prevent click transformation in swipe (#28558) 2019-03-27 14:37:04 +02:00
Johann-S
08679ac0b5 Add back support for IE 11 2019-03-18 01:11:05 +02:00
XhmikosR
6aa475c82e
Use one-line imports when possible. (#28467) 2019-03-13 14:55:53 +02:00
Johann-S
2fd50f98a5 build bootstrap in esm 2019-03-11 17:59:08 +02:00
XhmikosR
3ffe3a5d82 collapse.js: minor refactoring. 2019-03-11 17:01:28 +02:00
XhmikosR
1393678f0b Remove obsolete comments. 2019-03-11 17:01:28 +02:00
XhmikosR
dd0239d169 Remove more unused properties. 2019-03-11 17:01:28 +02:00
Johann-S
dce47b5451 scrollspy.js: remove unused properties 2019-03-11 17:01:28 +02:00
XhmikosR
5ac1a12625 Remove assignment from return. 2019-03-11 17:01:28 +02:00
XhmikosR
46c037410b Comply to the new rules. 2019-03-11 17:01:28 +02:00
XhmikosR
f7b55da450
dom/manipulator.js: minor simplification. (#28358)
Combine two checks since we return the same value for both.
2019-02-26 13:13:01 +02:00
Johann-S
8a37045b79 move util in a util folder with the sanitizer 2019-02-26 13:04:04 +02:00
Johann-S
fee11fd7ae use our selector engine instead of native api 2019-02-20 22:05:45 +02:00
XhmikosR
68e6de42ec Use Util.makeArray(). 2019-02-20 22:05:45 +02:00
Johann-S
e58b47cf74 improve event handler 2019-02-20 22:05:45 +02:00
XhmikosR
30861cbc6d Simplify checks. 2019-02-20 22:05:45 +02:00
XhmikosR
4b7c058a25 Remove unneeded ESLint suppression. 2019-02-20 22:05:45 +02:00
Johann-S
08227506f2 use only dataset to get data attributes 2019-02-20 22:05:45 +02:00
Johann-S
764bab2941 remove polyfills which override browsers default 2019-02-20 22:05:45 +02:00
XhmikosR
f0c6b24bd7 4.3.1. 2019-02-20 22:05:45 +02:00
Joshua Wilson
fdbb5db919 minor jQuery.hasclass removal (#28158) 2019-02-20 22:05:45 +02:00