aboutsummaryrefslogtreecommitdiff
path: root/js/src/dropdown.js
AgeCommit message (Collapse)AuthorFilesLines
2017-10-19fix version numberMark Otto1-2/+2
2017-10-19new version numberMark Otto1-2/+2
2017-10-04Use imported jQuery objectJohann-S1-1/+1
2017-10-03Offset option for dropdown can be function (#24222)Roman O1-4/+11
* Offset option can be function (Popper.js) * Fix...add function type for offset option * Remove constants for popper config * Optimize code. Remove foreach loop. * Refactoring. Remove getOffset method
2017-09-07Remove placement attribute from our Dropdown pluginJohann-S1-9/+2
2017-08-31Create a bundled release of Bootstrap with Popper.js insideJohann-S1-4/+4
2017-08-23Tweak ESLint rules.XhmikosR1-2/+2
2017-08-10bump to betav4.0.0-betaMark Otto1-2/+2
2017-07-04Dropdown - Disable applyStyle modifier instead of removing inline style ↵Johann-S1-7/+3
applied by Popper.js
2017-06-17Detect if the dropdown is in a navbar or not when update is calledJohann-S1-0/+1
2017-06-17Some .navbar .dropdown-menu optimisation (#22776)Catalin Zalog1-15/+0
2017-06-17Reset Popper.js styles for Dropdowns in navbarJohann-S1-16/+51
2017-06-16fix some errors in our jsJohann-S1-5/+3
2017-05-22Better management of dropdown/dropup with alignmentJohann-S1-22/+26
2017-05-17Use popper to align dropdown menu instead of using css with importantJohann-S1-3/+28
2017-05-14Use _jQueryInterface for Dropdown to call toggle methodJohann-S1-28/+26
2017-05-14Add fallbackPlacement option for Tooltip and PopoverJohann-S1-1/+2
2017-05-14Allow to disable flip behaviour on Dropdown + documentationJohann-S1-2/+12
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