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

733 Commits

Author SHA1 Message Date
XhmikosR
57e045f0ab Backport #32224
Be consistent with Popper's name.
2020-11-24 08:40:11 +02:00
XhmikosR
7eee78c517 Backport #32178 and #32182
Handle Chromium to run Karma
2020-11-24 08:40:11 +02:00
Rohit Sharma
bfb773d64b
Backport #32179 (#32220)
Don't hide modal when `config.keyboard` is false
2020-11-21 22:14:28 +02:00
James Remeika
2d8c02eb10
tooltip/popover: add a customClass option (#31834)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-11-20 11:56:16 +02:00
Mitchell Bryson
896e444895
Check for data-interval on the first slide of carousel - v4 (#31820)
When starting a cycle for a carousel, it only checks for a default interval, and not an interval defined on the slide element via data props. This adds a check in before creating the interval to move to the next slide.

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-11-12 09:34:17 +02:00
XhmikosR
b3aa3958da Backport #32045
tests: fix sanitizer test.

The test template does not include a `script` tag so the test always returned true.
2020-11-05 11:22:05 +02:00
Patrick H. Lauke
5f1bc4a756 Remove redundant visually hidden "(current)" from pagination controls (#31892)
* Replace visually hidden span with aria-current in tests

* Remove redundant visually hidden "(current)" when `aria-current` already used

Closes #31891
2020-10-27 12:11:01 +02:00
XhmikosR
1b48122641 Update .eslintrc.json
Enforce ES5 for tests
2020-10-13 15:24:40 +03:00
Laussel Loïc
24572b1577
buttons plugin : avoid multiple change event trigger (#31000)
- add unit test to count how many events are thrown when widget contains multiple tags inside label
- add a parameter to toggle, if click event is provided onto an input then don't trigger another change event already thrown by the browser
- simplify the case where toggle interface is called click provide from input itself OR it's a button without label. If label is present, then browser propagate click event from childrens through label and then cause multiple calls to toggle
- the test assumes that `.btn` class is always set onto the label if there's one, otherwise need to update this plugin and look for label around the input

Test with keyboard, mouse and js click call

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-10-02 17:40:20 +03:00
Joakim Riedel
b0a0c56788
ensure hidePrevented.bs.modal can be prevented (#31696) 2020-09-21 14:41:40 +03:00
XhmikosR
3be585990c Comply to the new rules 2020-09-10 12:06:30 +03:00
XhmikosR
1c37a2ba77 Switch to xo and remove babel-eslint 2020-09-10 12:06:30 +03:00
Rohit Sharma
1abe9264aa Add unit test for toast to check clearTimeout to have been called (#31298) 2020-08-03 19:06:36 +03:00
XhmikosR
38bcf108c9
Update dependencies, gems and regenerate package-lock.json (#31261)
* @rollup/plugin-node-resolve 8.1.0
* popper.js 1.16.1
* qunit 2.10.1
* rollup 2.21.0
2020-07-09 15:21:41 +03:00
ysds
9a6cfeb36e Backport #30326 (Unit test) 2020-07-06 16:40:27 +03:00
XhmikosR
c49b084158 BrowserStack: test on Edge 15 2020-07-06 16:40:27 +03:00
XhmikosR
3349eb6a41 Update links to point to v4-dev or main branches 2020-06-24 15:16:58 +03:00
XhmikosR
78a51cb12f Backport #30973
Remove the class `.nav-item` from `.nav-link` inside the non `ul` or `ol` based navs.
This makes the consistency for `.nav-item` (This class will not be required on the `.nav-link`).
`.nav-item` was only required when you use `.nav-fill` or `.nav-justified` on the `.nav`. In other cases, it was redundant. And the purpose of `.nav-item` on `.nav-link`s can be achieved via flexbox utilities as well (Mentioned in the docs also).
2020-06-24 15:16:58 +03:00
Laussel Loïc
e9f039d1fe
avoid preventing input event onclick (#30992)
* instead of stopping event if onclick is triggered on input, call toggle method only if its not on checkbox inside a label

* add unit test

* add a dedicated test to ensure click event is forward to label

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2020-06-10 15:45:31 +03:00
XhmikosR
3caea1ca02 visual/modal.html: fix close buttons placement 2020-06-04 17:53:16 +03:00
XhmikosR
8bc6dcd280 Backport #30936
Add role="dialog" in modals via JavaScript
2020-06-04 17:53:16 +03:00
XhmikosR
7a9bbd4489 Backport #30742
Update to `@rollup/plugin-babel`
2020-06-04 17:53:16 +03:00
XhmikosR
30e7df6cca Backport d59de33 from #30772
Add a test about the scrollbar issue on non-integer width
2020-05-12 19:21:36 +03:00
Rohit Sharma
d2f9fbd055 Removed role="document" from the modal dialog (#30755) 2020-05-12 19:21:36 +03:00
XhmikosR
eb720f20ff Minor lint tweaks and rules cleanup 2020-05-12 19:21:36 +03:00
XhmikosR
5f79b75ea8 tests: switch to strictEqual/notStrictEqual 2020-05-12 19:21:36 +03:00
XhmikosR
195585f5a6 scrollspy.js add more tests 2020-05-12 19:21:36 +03:00
Johann-S
22f75ca2e3 enforce element check on scrollspy target 2020-05-07 09:31:49 +03:00
Martijn Cuppens
7a678fc64f Backport #30633
Remove caret element
2020-04-28 20:59:30 +03:00
XhmikosR
d848c32297 Fix tests for jQuery v3.5.0. 2020-04-17 11:41:32 +03:00
Laussel Loïc
0cf29baf63
v4 tabs - accessibility issue when using ul/li semantic (#30381)
Add aria-role presentation on li element when ul element has role tablist and remove dropdown from visual tests as they've been removed from doc
2020-04-10 08:35:09 +03:00
luktom
8cc9defbc0
Fix event propagation from inactive and disabled dropdowns (#30510) (#30511) 2020-04-07 21:16:17 +03:00
XhmikosR
467c961976 Remove holder.js leftovers (#30469) 2020-03-31 21:11:29 +03:00
Johann-S
dabd458b4b Backport (#30383)
fix: ensure totype always return stringified null when null passed
2020-03-31 21:11:29 +03:00
Laussel Loïc
8b6dd449d7
fix $().button('toggle') not working for checkbox inside label (#30388) 2020-03-16 14:28:33 +02:00
XhmikosR
61276d0881 Drop Node.js < 10 support and update all devDependencies.
* sinon 8.x doesn't work with IE, so leave it at 7.x.
2020-03-09 16:26:10 +02:00
Giovanni Mendoza
6daae47cc0 Backport #29886
Close modal with keyboard=true & backdrop=static
2020-02-17 21:33:54 +02:00
Johann-S
dd96b832f7 backport #29516: added animation when modal backdrop is static 2019-11-02 10:02:07 +02:00
Johann-S
29f585365f backport #29523: skip hidden dropdowns while focusing 2019-11-02 10:02:07 +02:00
Johann-S
ef1c7aadbc Backport #29298
dropdown show method should do the same as toggle
2019-08-27 16:32:25 +03:00
Johann-S
bab999701c Backport #29277
dropdown - destroy old popper.js references
2019-08-27 16:32:25 +03:00
Johann-S
7652d326e4 Backport #29251
allow to pass popper.js configuration for tooltip/popover and dropdown
2019-08-27 16:32:25 +03:00
Johann-S
e4d4c5d0bc Backport #29155
allow dynamic modal body for scrollable modals
2019-07-31 11:37:39 +03:00
Kitten King
b66abdf3b1 Fix Typos across Bootstrap repository (#29082) 2019-07-31 11:37:39 +03:00
Patrick H. Lauke
be80d26cdb Ensure button plugin sets/removes active class correctly on page load (#28952)
* Ensure correct active class is set on button toggles/checkboxes/radios on page load

Sanity check, ensures that the UI visually matches the actual values/states of controls. Also ensures that if any autocomplete/autofill happened, this is visually accounted for
by having the correct class set.

Includes unit tests (and `autocomplete` has been removed from these as it's no longer necessary)

* Remove now unnecessary autocomplete attribute

As the attribute was there to force/ensure that the visual presentation matched the state, and this is now taken care of programmatically, there's no need to unnecessarily suppress autocomplete...let them autocomplete if they want to...
2019-07-10 11:03:54 +03:00
Patrick H. Lauke
5f44e01dab Add missing dropdown unit test for closing with ESC (#28929)
Backport of the unit test from https://github.com/twbs/bootstrap/pull/28928
2019-06-19 13:43:48 +03:00
Patrick H. Lauke
1da3aa3103 Don't open dropdown on ESC on trigger element (#28912)
* Don't open dropdown on ESC on trigger element

Closes #28751
2019-06-18 15:02:58 +03:00
Patrick H. Lauke
24abed1336 Fix keyboard handling of button-style checkbox/radio button groups (#28834)
- adds more defensive checks to make sure no unnecessary toggling happens on disabled buttons; this also fixes an up-to-now undiscovered bug where a toggle button with `.disabled` class would still have its `aria-pressed` toggled
- adds a set of explicit tests for the above case of disabled buttons and `aria-pressed`
- remove a now irrelevant (or at least very nonsensical) test for `<label>` containing both an actionable and a `hidden` `<input>`
- expand the test for disabled checkbox to also explicitly test starting conditions (used mainly in my debugging)
- ensure that `$btn[0].click()` is used to click checkboxes in tests, rather than the `click()` on the jquery object which is simply a shorthand for `trigger('click')` and does not actually trigger the browser default behavior
- remove the `preventDefault()` from the button handling, which was preventing correct keyboard functionality for checkboxes/radio buttons
- add extra logic to the button.js code to handle checkboxes correctly and avoid double-triggering as a result of mouse interactions (which saw the checkboxes being toggled twice, thus returning them to their original state)
- add logic that prevents the `checked` property from being added incorrectly for any inputs other than radio buttons and checkboxes
- added more tests (including the most basic test for a properly triggered fake checkbox button)
- work around Firefox bug #1540995 (which this code was hitting after removing the `preventDefault()`, due to Firefox's incorrect toggling of disabled checkboxes when programmatically (but not manually) activated with a `click()` event
2019-06-18 15:02:58 +03:00
Johann-S
c6dd1a7d93 Backport #28777.
Toast should allow prevent default for hide and show events
2019-05-30 11:58:34 +03:00
Martijn Cuppens
e9d8c1a9dd Backport #28679.
* Documentation tweaks
* Remove redundant `col-12` classes
2019-05-09 21:30:32 +03:00