0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-29 11:24:18 +01:00
Commit Graph

2033 Commits

Author SHA1 Message Date
XhmikosR
bf09367486
Release v5.0.0 (#33647)
* Bump version to 5.0.0

* Fix npm tag

* Dist
2021-05-05 22:32:12 +03:00
GeoSot
d381820d16
Scrollbar: respect the initial body overflow value (#33706)
* add method to handle overflow on body element & tests
* replace duplicated code on modal/offcanvas tests
2021-04-25 06:50:16 +03:00
alpadev
e2294ff090
Add missing test for clicking select option in a dropdown (#33734) 2021-04-25 06:45:08 +03:00
Carson Sievert
2cbb0a941c
Dropdown: support .dropdown-item wrapped in <li> tags (#33634)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-04-21 08:30:19 +03:00
GeoSot
079f2cd90c
Offcanvas.js: If scroll is allowed, should allow focus on other elements (#33677) 2021-04-20 08:32:52 +03:00
GeoSot
0bbe45cd97
Tab.js: Fixes on click handling (#33586)
* use prevent default only if triggered by anchor
* disable auto-initialization if trigger is disabled
2021-04-20 08:26:58 +03:00
Rohit Sharma
b59b75bc55
Dropdown — Add option to make the dropdown menu clickable (#33389) 2021-04-20 08:19:57 +03:00
Rohit Sharma
a22f4d3cfd
Don't change the value for altBoundary option (#33684)
- Since bootstrap is not changing the default value of `elementContext`
  option, changing the value of `altBoundary` option is not needed for
any modifier in real

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-04-19 19:58:45 +03:00
alpadev
d67121db28
Fix regression for handling mouseenter/mouseleave events introduced by #33310 (#33679)
* test: update spec for sibling adjacent mouseenter/mouseleave events

there is a regression introduced by #33310 - this would have catched that

* fix: fixup regression for mouseenter/mouseleave events introduced by #33310

the old logic only worked for parent-child movement since it checked for the relatedTarget to contain the delegateTarget - this should be fixed with this

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-04-19 08:30:33 +03:00
GeoSot
a9d7a62658
Use the backdrop util in offcanvas, enforcing consistency (#33545)
* respect /share modal's backdrop functionality, keeping consistency
* listen click events over backdrop (only) and trigger `hide()` without add/remove event tricks
* achieve to hide foreign open offcanvas instances without glitches `if (allReadyOpen && allReadyOpen !== target)`, in case another is going to be open, when user clicks on trigger button
2021-04-19 08:20:25 +03:00
GeoSot
6ea4dab142
modal.js: fix test for scrollbar (#33666)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-04-18 20:55:22 -07:00
alpadev
6d312b37c2
fix: clicking an item in navbar dropdown collapses the dropdown in firefox (#33643) 2021-04-18 09:01:23 +03:00
Rohit Sharma
7eadf73f03 Change toggle method to remove
Since the class `.show` must be removed
2021-04-18 08:47:50 +03:00
Rohit Sharma
bce4684d34 Use context properties 2021-04-18 08:47:50 +03:00
Rohit Sharma
38a79ec64c Refactor dropdown's hide functionality 2021-04-18 08:47:50 +03:00
Carson Sievert
69f5c0130b
Fix v5 regressions in tab dropdown functionality (#33626)
Scope selector to `dropdownElement` when adding active classes
2021-04-15 13:53:55 +03:00
GeoSot
80085a12f6
Decouple BackDrop from modal (#32439)
* Create backdrop.js util

* revert breaking changes

remove PromiseTimout usage

revert class name

* one more test | change bundlewatch.config

* add config obj to backdrop helper | tests for rootElement | use transitionend helper

* Minor tweaks — Renaming

Co-authored-by: Rohit Sharma <rohit2sharma95@gmail.com>
2021-04-14 13:28:50 -07:00
GeoSot
0d440b0e14 Js: fix some tests 2021-04-14 13:25:44 -07:00
alpadev
db32b2380c
fix: make EventHandler better handle mouseenter/mouseleave events (#33310)
* fix: make EventHandler better handle mouseenter/mouseleave events

* refactor: simplify custom events regex and move it to a variable
2021-04-13 06:25:58 +03:00
alpadev
ad10f00d5e
refactor: make static selectMenuItem method private (#33589) 2021-04-11 18:34:46 +03:00
GeoSot
566451230f
Remove element event listeners through base component (#33429)
After some research, I found out that EventHandler saves all the custom events per element using namespace, and is capable of removing handlers using only the element and its namespace (`DATA_KEY`).

So, probably is better to utilize the base-component to do the same job.
2021-04-11 09:54:48 +03:00
Rohit Sharma
bac0b0c899 Update tests to check for noop to be removed 2021-04-11 09:42:52 +03:00
Rohit Sharma
5f946d3a86 Dropdown — Don't use event delegation 2021-04-11 09:42:52 +03:00
Rohit Sharma
b2bc159d72 Use cached noop function everywhere 2021-04-11 09:42:52 +03:00
GeoSot
7b7f4a5ced
Decouple Modal's scrollbar functionality (#33245) 2021-04-11 09:37:59 +03:00
Rohit Sharma
9bca1b5a8b
Remove unnecessary data-bs-backdrop="static" (#33578)
Since the value for the `backdrop` option is available in the configuration object.
2021-04-08 08:20:21 +03:00
GeoSot
0795a778f2
Fix wrong carousel transformation, direction to order (#33499) 2021-04-07 08:29:31 +03:00
GeoSot
317c2cd08e Omit getting data-attributes from toggle element 2021-04-06 18:43:43 +03:00
GeoSot
752b001b0a Simplify Modal config 2021-04-06 18:43:43 +03:00
GeoSot
0b34ff2fae
Simplify ScrollSpy config (#33250) 2021-04-06 18:28:10 +03:00
Rohit Sharma
20cfbdff79
Add missing things in hide method of dropdown (#33451)
* Update `aria-expanded` attribute in `hide` method

* Remove empty mouseover listeners added for iOS
2021-04-01 21:51:55 +03:00
alpadev
f36f834453
Fix dropdown escape propagation (#33479) 2021-04-01 21:44:04 +03:00
Rohit Sharma
5cc53a0ef0
Use template literals instead of concatenation (#33497) 2021-03-30 08:57:05 +03:00
GeoSot
8c3e6ebc6e
Use our isDisabled util on dropdown (#33456) 2021-03-30 07:42:23 +03:00
XhmikosR
220139a89f
Release v5.0.0-beta3 (#33439) 2021-03-23 18:26:54 +02:00
Casey Holzer
16bc47da3c Allow data-toggle="dropdown" and form click events to bubble
* remove stopPropagation from button click event

* test for delegated click events

* ensure button children can open menu

* test to ensure clicking button opens the menu

* check current element and parents

* allow dropdown form click events to bubble
2021-03-23 15:56:28 +02:00
dependabot[bot]
9667438c1e
Bump eslint-plugin-unicorn from 28.0.2 to 29.0.0 (#33435)
* Bump eslint-plugin-unicorn from 28.0.2 to 29.0.0

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 28.0.2 to 29.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v28.0.2...v29.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Fix lint failure

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-03-23 15:27:46 +02:00
GeoSot
1c02ef4f97
Allow offcanvas to be initialized in open state (#33382)
* Update docs to use new .show behavior and clarify some copy for first example

Co-authored-by: Mark Otto <markdotto@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-03-23 08:22:59 +02:00
XhmikosR
d9da43f3cc
.browserslistrc: remove Android and make Safari/iOS 12 the minimum (#33399) 2021-03-22 23:02:10 +02:00
XhmikosR
a88d61db6f
BrowserStack: test on iPhone 12 (#33398) 2021-03-18 17:45:12 +02:00
Rohit Sharma
72ef1dfdbd
Update unit tests for Popper V2 (#32662) 2021-03-17 21:25:57 +02:00
Patrick H. Lauke
3ce0a8d3ec
Dynamic tab should not show when triggered on disabled element (#33257)
* show() should bail if the trigger has `disabled` attribute

* use 'isDisabled' helper

Co-authored-by: GeoSot <geo.sotis@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-03-17 10:52:40 +02:00
GeoSot
b9f30903a5
Fix carousel RTL and refactor code, fix rtl swipe issues (#32913)
* move common code to reusable functions

* add/re-factor tests, directionToOrder func

* add _orderToDirection tests

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-03-17 07:58:43 +02:00
GeoSot
c5083d5fc3
Use more safe check for 'isDisabled' helper (#33385) 2021-03-17 07:44:15 +02:00
GeoSot
ddf72bc612
Accept data-bs-body option in the configuration object as well (#33248)
* Accept data-bs-body option in the configuration object as well

Tweak jqueryInterface, add some more tests

* Fix Markdown table formatting and tweak the wording on backdrop

Co-authored-by: Mark Otto <markdotto@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-03-16 18:35:03 +02:00
Ryan Berliner
99b2c0b390 only trigger tooltip inserted event on true dom insert 2021-03-16 07:48:50 +02:00
Ryan Berliner
72d2313579 reuse existing popper on show during tooltip fadeout 2021-03-16 07:48:50 +02:00
Ryan Berliner
6ef70b342c prevent quick interactions from misplacing tooltips 2021-03-16 07:48:50 +02:00
Ryan Berliner
d491c29aa0 prevent tooltip from being deleted on quick re-activations 2021-03-16 07:48:50 +02:00
Rohit Sharma
6ecd1c626e
Change the name of the Offcanvas constructor (#33261) 2021-03-16 07:21:04 +02:00