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

758 Commits

Author SHA1 Message Date
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
Johann-S
c50c1e9d23 fix unit tests for chrome mobile 2019-04-29 17:41:28 +03:00
XhmikosR
060880296a karma.conf.js: switch to CI === true. (#28588) 2019-04-29 17:41:28 +03:00
Johann-S
8fda884ad3 Reset carousel touch delta x to prevent click transformation in swipe (#28558) 2019-03-27 20:57:28 +02:00
Johann-S
86de1d3875 fix jquery detection 2019-03-08 00:30:24 +02:00
Johann-S
7bc4d2e0bc Add sanitize template option for tooltip/popover plugins. 2019-02-13 08:32:15 +02:00
Johann-S
b54ddfda83 fix modal test to be sure we call getTransitionDurationFromElement 2019-02-06 15:01:13 +01:00
Johann-S
3c49467224 allow to override default toast options (#28186) 2019-02-06 15:19:04 +02:00
Johann-S
11880109fc
fix tabs, apply show class only when fade class is present (#28183) 2019-02-06 11:12:02 +01:00
Jason Golieb
e44d0475e0 Move dropdown offset function logic into private function. (#28138) 2019-02-05 10:31:18 +02:00
Jason Golieb
88a34aacbe Add support for tooltip offset option to be a function. 2019-02-05 10:24:49 +02:00
Shohei Yoshida
de0bb1e052 Scrollable modal (#27769) 2019-01-20 23:28:16 +02:00
Johann-S
842da1ddc3
use absolute path to output lcov file for coveralls (#28075) 2019-01-17 11:06:43 +01:00
XhmikosR
3aeda9942d
tests: use jQuery from node_modules. (#28059) 2019-01-15 18:01:40 +02:00
Johann-S
d51ee0dcf1 Fix Carousel's touch option to not add touch listeners when set to false (#28046) 2019-01-14 18:53:54 +02:00
Johann-S
89a73f100e carousel should not cycle when there is no data-ride on init (#27968) 2019-01-04 18:15:01 +02:00
Johann-S
3bd9fb3649 getSelectorFromElement return null on bad selectors (#27912) 2018-12-23 14:30:35 +02:00
Mark Otto
eda851ee76 Prep for v4.2.0 release
- Move 4.1 docs to 4.2
- Update versions everywhere to 4.1.3 with release script
- Manually bump the shorthand version in package.json
- Add 4.2 to the versions docs page
- Update some redirects
- Fix tests asset URLs
- Bump Nuget and more
2018-12-21 09:03:29 -08:00
XhmikosR
07b4b5907b
Revert "Remove now unnecessary shrink-to-fit viewport directive (#27818)" (#27855)
This reverts commit af484dc12c.
2018-12-16 16:39:48 +02:00
Patrick H. Lauke
af484dc12c
Remove now unnecessary shrink-to-fit viewport directive (#27818)
`shrink-to-fit=no` is not needed anymore - Apple removed the need for it from iOS9.3 onwards

See https://www.scottohara.me/blog/2018/12/11/shrink-to-fit.html and https://github.com/h5bp/html5-boilerplate/issues/2102
2018-12-15 01:05:49 +00:00
Johann-S
af60644d2f integration test to be sure bootstrap can be bundled 2018-12-14 02:08:18 +02:00
XhmikosR
a074cb66d7 Make use of the package.json version_short property more. 2018-12-14 00:34:38 +02:00
Mike Vastola
fc15c4c4ce Change button checkbox/radios to ignore hidden input fields (#27802) 2018-12-10 10:40:08 +02:00
Johann-S
fa03289d13 avoid console call in our unit tests (#27790) 2018-12-06 10:51:35 +02:00
Patrick H. Lauke
6c00dd08bc Add aria-modal to modals (#27780)
Dynamically set/remove `aria-modal="true"` when a modal is shown/hidden
2018-12-05 20:58:09 +02:00
Johann-S
b16127fc10 Allow Tooltips/Popovers to work in shadow DOM 2018-12-05 16:02:59 +01:00
Johann-S
37f74c7070 fix regression about using element for tooltip container option 2018-12-05 10:57:02 +01:00
Johann-S
32ab52ba2e Add test to make sure we enforce focus on modal (#27723) 2018-11-25 18:20:55 +02:00
XhmikosR
2b9af5e38c Remove holder.js. 2018-11-20 21:31:28 +02:00
Laussel LOïc
dc07e8dca8 Update toast documentation following pull #27155
Also remove close button everywhere just let it when autohide is set to false
2018-11-13 08:47:32 +02:00
Johann-S
557d5ac74d Remove the show delay for our toast plugin 2018-11-13 08:47:32 +02:00
Laussel Loïc
4cac833447 Implement data-dismiss="toast" to allow user to interact itself with the component (#27155) 2018-11-13 08:47:32 +02:00
Johann-S
2f81ab007c Fix toast documentation page. 2018-11-13 08:47:32 +02:00
Johann-S
16cf76ff1a Create toast JS plugin, add unit tests. 2018-11-13 08:47:32 +02:00
Johann-S
f7a4b39767 handle detached tooltip when we try to hide a modal 2018-11-02 13:39:58 +01:00
Johann-S
cebdfb9090 fix dispose modal unit test 2018-10-30 16:59:24 +01:00
Andrew Luca
bd2851938a test(Modal): check if modal is disposed 2018-10-30 16:28:32 +01:00
XhmikosR
02df7cd0d2
Fix util tests on IE 10 (#27556) 2018-10-30 15:29:04 +02:00
Martijn Cuppens
5aed968750 Prevent the background to be shown when transitioning 2018-10-30 08:57:02 +02:00
Johann-S
2868f07240 update our coverage required for branches and functions 2018-10-29 14:49:29 +01:00
Johann-S
91f8077ed5 add unit tests for our carousel 2018-10-29 14:49:29 +01:00
Johann-S
2c2d04aba5 add unit test to test tabs can be removed without throwing error 2018-10-29 14:01:03 +01:00
Johann-S
ffc8d507c7 calculate modal transition duration based on modal-dialog element 2018-10-28 23:59:17 +02:00
Andrew Luca
1f1308ba22 test(Modal): reuse _getScrollbarWidth in tests 2018-10-21 17:45:02 +02:00
Johann-S
b1dc6b324c avoid drag img 2018-10-20 15:32:09 +03:00
patrickhlauke
8883ccb205 Set touch-action to "none"
Firefox currently seems extremely fickle - with `pan-y` if fires pointercancel as soon as a touch strays even a pixel or so vertically.
While `touch-action: pan-y` would be ideal (allowing users to scroll the page even when their finger started the scroll on the carousel), this prevents a swipe that isn't perfectly/only horizontal to be recognised by Firefox.
2018-10-20 15:32:09 +03:00
patrickhlauke
7b8f01d839 Use correct touch-action values
- my fault, my original advice of using `touch-action: pan-x` is exactly the value we *don't* want to have the browser handle...
2018-10-20 15:32:09 +03:00
Johann-S
735c374e9c use pointer events if available 2018-10-20 15:32:09 +03:00
Johann-S
c08652cfe8 swipe left/right without hammerjs 2018-10-20 15:32:09 +03:00
Johann-S
caefd70463 Add touch support in our carousel with HammerJS. 2018-10-20 15:32:09 +03:00
galczo5
6cbcd03efb Add show and hide methods to dropdown (#27370) 2018-10-20 14:27:51 +03:00
XhmikosR
ea575bc1a7 js/tests/visual: fix popper script.
Broken after 787441d.
2018-10-14 08:17:40 +03:00
XhmikosR
339311ddb5 Fix invalid selectors in tests and examples. 2018-10-14 08:17:40 +03:00
Christopher Morrissey
ea0faadde5 feature(carousel): carousel-item interval (#26667)
adds the ability to assign data-interval to an individual carousel-item
2018-09-18 15:55:48 +03:00
XhmikosR
787441d4bf docs: use the bundle dist file. 2018-09-18 12:50:18 +03:00
XhmikosR
0b97d1b0c4 Use https in more places and fix a few redirects. 2018-09-14 18:27:55 +03:00
Johann-S
a689120fd2 throw error when folks try to use a bad selector 2018-09-13 22:13:36 +02:00
Johann-S
9efed82522 refactor karma config in one file 2018-09-13 21:59:37 +02:00
Johann-S
c543f360c9 do not use coverage files on browserstack 2018-09-13 21:59:37 +02:00
Johann-S
6e2a823a44 collapse children with no data-parent 2018-09-10 21:10:00 +02:00
Johann-S
a3e45d8ced
add information about valid selectors (#27137) 2018-08-31 21:00:29 +02:00
Johann-S
54d86e6249 move away from sauce labs to browserstack 2018-08-30 22:17:15 +02:00
Johann-S
eab9da5beb fix(util): use querySelector for ids 2018-08-12 17:01:01 +02:00
Johann-S
6b92321f6a fix(util): use getElementById when it's possible 2018-08-07 18:49:02 +02:00
Johann-S
d18045210c fix(tests): visual plugins tests 2018-07-23 17:29:53 -07:00
Mark Otto
0e920ce3f4 Reorganize docs for easier deploys
With the current docs directory setup, I'm making too many mistakes and have to manually address path changes and directory moves on deploy. This makes for a frustrating experience developing locally and shipping releases. With this PR, we're basically back to the same setup from v3—duplicating the dist directory into our docs directory. Not the most ideal, but very straightforward for me as the release manager.
2018-07-11 23:30:46 -07:00
Johann-S
283ab30164 fix(modal): fix unit test and resetting style 2018-07-11 11:05:38 +02:00
Catalin Zalog
cb82394fc8 fix(modal): removes .navbar-toggler margin 2018-07-11 11:05:38 +02:00
Johann-S
e57a2f244b fix(tooltip): get tip on placement change 2018-06-25 16:54:14 +02:00
jakubhonisek
49e094619b feat(dropdown): add original click event 2018-06-25 15:29:34 +02:00
Johann-S
149096016f fix(collapse): xss in parent option 2018-06-01 09:10:25 +02:00
Johann-S
2d90d369bb fix(tooltip): xss in container option 2018-06-01 09:10:25 +02:00
Johann-S
f2aab5ea99 fix(tooltip): remove useless unit test 2018-05-22 17:26:21 +03:00
Johann-S
0338b61eb6 chore(deps): update qunit and karma-qunit 2018-05-22 17:26:21 +03:00
Johann-S
ba10b63c9d fix issue related to Object.keys and Dropdown issue 2018-04-13 18:59:30 +02:00
Swardu
c3caf7ee4e Docs/examples: change links to Sass documentation and example.com to https 2018-04-12 11:56:33 +01:00