aboutsummaryrefslogtreecommitdiff
path: root/js/src/dropdown.js
AgeCommit message (Collapse)AuthorFilesLines
2017-05-14Add an update method to allow to update position for ↵Johann-S1-0/+6
Tooltip/Popover/Dropdown manually
2017-05-14Better placement for Dropdown + Handle flip of Tooltip/PopoverJohann-S1-2/+2
2017-05-14Remove totaly Tether from documentation + dependenciesJohann-S1-3/+3
2017-05-14Handle dropup for DropdownJohann-S1-2/+9
2017-05-14Fix unit tests + Update Popper to 1.6.0Johann-S1-6/+8
2017-05-14Remove constraints option and check every optionsJohann-S1-8/+6
2017-05-14Begin to use Popper for DropdownJohann-S1-8/+90
2017-04-20Tweak iOS hack for dropdownPatrick H. Lauke1-2/+2
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-14Replace dropdown backdrop hack with cleaner JS-only hackPatrick H. Lauke1-14/+9
* 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-12Merge branch 'v4-dev' into dropdown-keyboardPierre Vanduynslager1-5/+6
2017-04-12Reword "mobile" to "touch-enabled"Patrick H. Lauke1-5/+6
...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-12IndentPierre-Denis Vanduynslager1-1/+1
2017-04-08Merge branch 'v4-dev' into dropdown-keyboardPierre Vanduynslager1-15/+17
2017-03-18Fix backdrop for dropdown menu on mobile (#21578)Pierre Vanduynslager1-15/+17
- Create backdrop only if the menu is actually open (do not create it if the show event is prevented) - Drop the backdrop only when the corresponding menu is closed (do not remove if there is no menu to close or if the hide event is prevented)
2017-02-08Fixes #21941Pierre-Denis Vanduynslager1-6/+8
2017-01-22Fix spacebar key in Firefox for button elementsPierre-Denis Vanduynslager1-4/+4
2017-01-15Merge branch 'twbs/v4-dev' into dropdown-keyboardPierre-Denis Vanduynslager1-1/+3
2017-01-15Use existing keycode constants in dropdown. (#21697)Pierre-Denis Vanduynslager1-1/+3
2017-01-06Merge branch 'twbs/v4-dev' into dropdown-keyboardPierre-Denis Vanduynslager1-2/+2
2017-01-06version bumpMark Otto1-2/+2
2017-01-04Merge conflictPierre-Denis Vanduynslager1-6/+0
2017-01-04Merge branch 'twbs/v4-dev' into dropdown-keyboardPierre-Denis Vanduynslager1-3/+10
# Conflicts: # js/src/dropdown.js
2017-01-02Dropdown: close menu when focusing outside element (#21375)Pierre-Denis Vanduynslager1-4/+5
* Close dropdown menu when focusing an outside element * Update unit test to new markup
2016-12-28Merge branch 'twbs/v4-dev' into dropdown-keyboardPierre-Denis Vanduynslager1-42/+47
2016-12-07Rename `.active` to `.show`Starsam801-6/+6
2016-11-26Follow up fix to #19953 for linting error in buildsMark Otto1-1/+1
See https://travis-ci.org/twbs/bootstrap/jobs/179010884 for build failure
2016-11-26Dropdown perf - on keyboard nav, find active item in the active dropdown ↵Pierre-Denis Vanduynslager1-5/+1
rather than the whole document (#19953)
2016-11-24Make JS compliant with the new ESLint rules.Bardi Harborow1-22/+27
2016-10-25Use a single class name for opened/expanded/shown state of widgetsJohann-S1-6/+6
2016-10-19version bump to alpha 5Mark Otto1-2/+2
2016-09-05versionsMark Otto1-2/+2
2016-07-27bump versionsMark Otto1-2/+2
2016-05-30Use named constants for magic numbers (#19992)Chris Rebert1-12/+16
Mostly KeyboardEvent.which and MouseEvent.which values. [skip validator]
2016-05-22Dropdown: remove dependency to role="menu", role="listbox" a and li elements ↵Pierre-Denis Vanduynslager1-6/+3
=> fix keyboard navigation
2015-12-24Merge pull request #18393 from twbs/dropdown-bitwise-less-tricksyChris Rebert1-1/+1
dropdown.js: Use more straightforward phrasing for index bound check
2015-12-08Update version numbers using npm scriptChris Rebert1-1/+1
Errata from: * 8ce5da30260c1368ae97838fcf010375071a7243 * 5d3144e8fb5c7202991b7614d77dfc00903fcb2e which missed a few numbers. [skip sauce] [skip validator]
2015-12-08manually bump versions because npm script wasn't working for meMark Otto1-1/+1
2015-12-05Fix version numbers is JS files; fixes #18435Chris Rebert1-2/+2
[skip sauce] [skip validator]
2015-12-03Tweak ESLint rules.XhmikosR1-5/+5
2015-11-30dropdown.js: Use more straightforward phrasing for index lower bound checkChris Rebert1-1/+1
[skip sauce] [skip validator]
2015-10-02Add throw error for undefined method on pluginsJohann-S1-0/+3
2015-08-18js tests passing + eslintJacob Thornton1-8/+16
2015-08-15fix dropdown testJacob Thornton1-2/+2
2015-05-13implement global dispose methodfat1-14/+31
2015-05-10add getters for Version and Default where applicablefat1-0/+8
add modal my gawd
2015-05-10add dropdownfat1-0/+261