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

1340 Commits

Author SHA1 Message Date
Johann-S
4c3b6c5ceb Placement auto for popovers 2017-05-24 14:57:40 +02:00
Johann-S
2c72af88ee Placement auto for tooltips 2017-05-24 14:57:40 +02:00
Johann-S
aa36439e17 Use Popper.js to manage arrow position 2017-05-23 15:19:54 +02:00
Johann-S
70f4a30def Better management of dropdown/dropup with alignment 2017-05-22 16:14:10 +02:00
Johann-S
b36d8ae6cb Use popper to align dropdown menu instead of using css with important 2017-05-17 22:03:11 +02:00
Johann-S
3719ed4cb6 build 2017-05-16 10:09:48 +02:00
Johann-S
c78cbb275b Change fallbackPlacement to flip by default for Tooltips/Popovers 2017-05-14 11:41:19 +02:00
Johann-S
cc455c16c3 Fix bad position for Tooltips with animation at true 2017-05-14 11:41:19 +02:00
Johann-S
0cdf176f7a Use _jQueryInterface for Dropdown to call toggle method 2017-05-14 11:41:19 +02:00
Johann-S
0ae9d28ba3 Add fallbackPlacement option for Tooltip and Popover 2017-05-14 11:41:19 +02:00
Johann-S
ab7dc8ae2a Fix dropdown in scrollspy visual test (add Popper.js) 2017-05-14 11:41:19 +02:00
Johann-S
4f882a840c Allow to disable flip behaviour on Dropdown + documentation 2017-05-14 11:41:19 +02:00
Johann-S
e5a0471b0b Add an update method to allow to update position for Tooltip/Popover/Dropdown manually 2017-05-14 11:41:19 +02:00
Johann-S
fc8b85b626 Fix some css for the arrow of Popover/Tooltip + update documentation 2017-05-14 11:41:19 +02:00
Johann-S
18e4e851e2 Better placement for Dropdown + Handle flip of Tooltip/Popover 2017-05-14 11:41:19 +02:00
Johann-S
d5fabf8de5 Remove totaly Tether from documentation + dependencies 2017-05-14 11:41:19 +02:00
Johann-S
53ee455bc7 Handle dropup for Dropdown 2017-05-14 11:41:19 +02:00
Johann-S
69de65180f Fix unit tests + Update Popper to 1.6.0 2017-05-14 11:41:19 +02:00
Johann-S
c21a2b0d92 Remove constraints option and check every options 2017-05-14 11:41:19 +02:00
Johann-S
54a8ab4011 Begin to use Popper for Dropdown 2017-05-14 11:41:19 +02:00
Johann-S
d8996a7e0a Fix arrow for tooltip and popover 2017-05-14 11:41:19 +02:00
Johann-S
b40b1bc396 Add attachment classes 2017-05-14 11:41:19 +02:00
Johann-S
81e07ec052 Begin to add arrow to Popover and Tooltip 2017-05-14 11:41:19 +02:00
Johann-S
6cf0fe8780 Use Popper for tooltip and popover 2017-05-14 11:41:19 +02:00
Joyce Babu
db2db6cd0e Fix typo removeData for Tabs plugin
Should remove `data` not `class` on dispose
2017-04-28 15:31:35 +02:00
Anna
33715a73d2 Fix Toggle buttons don't honor [disabled] or .disabled 2017-04-26 18:46:05 +02:00
Pierre Vanduynslager
ab39defe74 Detach accordion from card without requiring 'data-children' 2017-04-25 09:32:14 +02:00
Mark Otto
ba312c20a5 build 2017-04-21 23:58:09 -07:00
Zach Leatherman
638b97f19c Arguably more professional pictures of Rick Ross 2017-04-21 20:51:35 -07:00
Bardi Harborow
2906b612d5 More minor build tweaks and docs updates. 2017-04-21 21:08:40 +10:00
Patrick H. Lauke
fb3303f5dd Fix for copy/paste error in iOS hack to tooltips
(with apologies, this slipped through due to build system problems on my
end)
2017-04-20 14:35:33 +01:00
Patrick H. Lauke
1f37c536b2 Tweak iOS hack for dropdown
Tweak to https://github.com/twbs/bootstrap/pull/22426, where the wrong selector slipped through the net (selecting all of `<body>`s grand-children rather than children)
2017-04-20 14:08:40 +01:00
Patrick H. Lauke
ef099ad05d Add iOS hack to tooltips
Same hack as in https://github.com/twbs/bootstrap/pull/22426 (modulo the selector, which is wrong in that PR and will be updated in a separate PR) to get tooltips to work correctly on iOS. Dynamically adds/removes empty (`noop`) `touchstart` event handlers to all children of `<body>` in order to coax iOS into proper event delegation/bubbling
2017-04-20 13:49:35 +01:00
Bardi Harborow
b4ac48fdec Build system overhaul. 2017-04-20 14:31:22 +10:00
Patrick H. Lauke
6ae5fb12e6 Fix carousel "hover" behavior on touch-enabled devices
* Add carousel mouse listeners even if touch events enabled

- touch events are enabled not just on "mobile", just also on
touch-enabled desktop/laptop devices; additionally, it's possible to
pair a mouse with traditionally touch-only devices (e.g. Android
phones/tablets); currently, in these situations the carousel WON'T pause
even when using a mouse

* Restart cycle after touchend

as `mouseenter` is fired as part of the touch compatibility events, the
previous change results in carousels which cycle until the user
tapped/interacted with them. after that they stop cycling (as
`mouseleave` is not sent to the carousel after user scrolled/tapped
away).
this fix resets the cycling after `touchend` - essentially returning
to the previous behavior, where on touch the carousel essentially never
pauses, but now with the previous fix it at least pauses correctly for
mouse users on touch-enabled devices.
includes documentation for this new behavior.
2017-04-17 13:26:46 +01:00
Mark Otto
bc0cf36dc8 grunt 2017-04-16 13:54:07 -07:00
Patrick H. Lauke
6d64afe508 Replace dropdown backdrop hack with cleaner JS-only hack
* Replace backdrop with simple noop mouse listener

As discussed in https://github.com/twbs/bootstrap/pull/22422 the current
approach of injecting a backdrop (to work around iOS' broken event
delegation for the `click` event) has annoying consequences on
touch-enabled laptop/desktop devices.
Instead of a backdrop `<div>`, here we simply add extra empty/noop
mouse listeners to the immediate children of `<body>` (and remove
them when the dropdown is closed) in order to force iOS to properly
bubble a `click` resulting from a tap (essentially, method 2 from
https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html)
This is sufficient (except in rare cases where the user does manage to tap
on the body itself, rather than any child elements of body - which is not
very likely in an iOS phone/tablet scenario for most layouts) to get iOS to
get a grip and do the correct event bubbling/delegation, meaning the regular
"click" event will bubble back to the `<body>` when tapping outside of the dropdown,
and the dropdown will close properly (just like it already does, even without
this fix, in non-iOS touchscreen devices/browsers, like Chrome/Android and
Windows on a touch laptop).
This approach, though a bit hacky, has no impact on the DOM structure, and
has no unforeseen side effects on touch-enabled laptops/desktops. And crucially,
it works just fine in iOS.

* Remove dropdown backdrop styles

* Update doc for dropdowns and touch-enabled devices
2017-04-14 09:19:00 +01:00
Pierre Vanduynslager
2f94166276 Merge branch 'v4-dev' into dropdown-keyboard 2017-04-12 16:31:50 -04:00
Patrick H. Lauke
3275ca4b30 Reword "mobile" to "touch-enabled"
...as touch is not exclusive to "mobile" anymore nowadays. also explicitly clarifies this is a fix for iOS, and that it impacts touch laptops etc as well. lastly, renames the variable from "dropdown" to "backdrop" for clarity/consistency
2017-04-12 18:39:23 +01:00
Pierre Vanduynslager
208e0384df Merge branch 'v4-dev' into dropdown-keyboard 2017-04-12 10:36:14 -04:00
Pierre-Denis Vanduynslager
81e12d5715 Indent 2017-04-12 09:41:27 -04:00
Patrick H. Lauke
53b2c5520b Remove inappropriate role="listbox" from carousels 2017-04-11 11:12:30 +01:00
Pierre Vanduynslager
025ddb185e Merge branch 'v4-dev' into dropdown-keyboard 2017-04-10 11:04:05 -04:00
Patrick H. Lauke
18e8704221 Fix collapse.js aria-expanded behavior
* Remove aria-expanded from collapse.js target element

aria-expanded="true"/aria-expanded="false" only applies to the trigger,
not the element that is being expanded/collapsed.

* Tweak collapse.js accessibility section

...to make it clearer that the aria-expanded attribute always just goes
on the control.

* Fix collapse.js unit tests

- reword some of the text to make it clear we're checking behavior of
trigger/control
- move incorrect aria-expanded out of the <div>s and to the actual
trigger/control <a>s
- fix incorrect test assertion text output false -> true
2017-04-10 14:51:22 +01:00
Patrick H. Lauke
3f6e1faf45 Only change aria-pressed if it's not an input-based radio or checkbox group
* Only change aria-pressed if it's not an input-based radio or checkbox group

aria-pressed="true"/aria-pressed="false" is really only useful for
making on/off toggles out of, say, `<button>` elements. the attribute is
useless (and potentially confusing/conflicting) on, say, `<label>`
elements for an existing `<input type="radio">` or similar.

* Add unit test for buttons.js and radio/checkbox inputs in button groups
2017-04-10 14:43:54 +01:00
Pierre Vanduynslager
d3fbebefcd Merge branch 'v4-dev' into dropdown-keyboard 2017-04-09 18:16:37 -04:00
Patrick H. Lauke
2626eba5f1 Prevent default for ESC in modal.js
ESC can be used to close modals, but on OS X/macOS this also jumps out
of full-screen mode. `preventDefault` suppresses this.
2017-04-09 16:19:20 +01:00
Pierre Vanduynslager
fe72daf2b3 Merge branch 'v4-dev' into dropdown-keyboard 2017-04-08 18:43:25 -04:00
Mark Otto
364e01885f grunt 2017-04-08 13:22:53 -07:00
Ilias
e6e070b02a Fix #22332: Adjust tests for hidden scrollbar 2017-04-03 13:27:15 +02:00