aboutsummaryrefslogtreecommitdiff
path: root/js/src/tooltip.js
AgeCommit message (Collapse)AuthorFilesLines
2021-03-16only trigger tooltip inserted event on true dom insertRyan Berliner1-2/+1
2021-03-16reuse existing popper on show during tooltip fadeoutRyan Berliner1-3/+3
2021-03-16prevent quick interactions from misplacing tooltipsRyan Berliner1-1/+5
2021-03-16prevent tooltip from being deleted on quick re-activationsRyan Berliner1-0/+4
2021-03-02refactor: use a Map instead of an Object in dom/data (#32180)alpadev1-4/+4
Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Rohit Sharma <[email protected]>
2021-02-16util: change `isRTL` to a function (#32446)XhmikosR1-4/+3
This allows the bundler to tree-shake the function.
2021-02-10Release v5.0.0-beta2 (#32467)v5.0.0-beta2XhmikosR1-1/+1
* Bump version to 5.0.0-beta2 * Dist
2021-02-09Add function type for `popperConfig` option (#32882)Rohit Sharma1-4/+4
* Add function type for `popperConfig` option * Update .bundlewatch.config.json * copy edits Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2021-02-04Fix Popper preventOverflow boundary config (#32845)Kyle Tsang1-1/+1
Currently, the boundary config is being assigned to the wrong var (`rootBoundary`) in the popper config. It should be assigned to the `boundary` var in popper's config. Ref: https://popper.js.org/docs/v2/utils/detect-overflow/#boundary
2021-01-28Restore `offset` option for tooltip/popover componentsRohit Sharma1-0/+22
2021-01-27Tooltip refactoring (#32523)GeoSot1-84/+74
* tooltip: move common code to a reusable function * tooltip: return early in `show()` Co-authored-by: Rohit Sharma <[email protected]> Co-authored-by: XhmikosR <[email protected]>
2020-12-14Tooltip/popover - change the default value for `fallbackPlacements` (#32437)Rohit Sharma1-15/+9
The default Popper `fallbackPlacements` value is `[oppositePlacement]`. - The default value was previously (in v4) `'flip'` that can be achieved by passing the single value in the array, like — `[oppositePlacement]`. Keeping `null` also sets the `fallbackPlacements` to `[oppositePlacement]` (Default value in Popper) - It's better to have **clockwise** (`['top', 'right', 'bottom', 'left']`) fallback options so that tooltip/popover can be placed to another side even if the opposite placement doesn't fit. Co-authored-by: XhmikosR <[email protected]>
2020-12-10Tooltip - check if tip and its parent node exist in dispose method (#32420)Rohit Sharma1-1/+1
2020-12-10Remove `TRANSITION_END` from utils (#32394)XhmikosR1-3/+2
2020-12-09Add fallback behaviourMartijn Cuppens1-1/+2
2020-12-08Refactor components to use a utility function to define jQuery plugins (#32285)alpadev1-15/+2
* refactor: use an utility function to define jQuery plugins * test: add spec for defineJQueryPlugin utility function * Update .bundlewatch.config.json Co-authored-by: XhmikosR <[email protected]>
2020-12-07Prepare v5.0.0-beta1.XhmikosR1-1/+1
2020-12-06Update to popper.js v2.xJohann-S1-59/+50
2020-12-04feat(RTL): implement RTLGaël Poupard1-3/+16
Using RTLCSS directives, renaming things to use logical names and following best practices.
2020-12-02Unbreak lines. (#32304)XhmikosR1-26/+9
2020-11-30tooltip.js: reuse existent variableXhmikosR1-2/+2
2020-11-30Extra check for existence of any `aria-label`Patrick H. Lauke1-2/+2
before overwriting it...
2020-11-30Accessibility update for tooltip.jsMatty Williams1-0/+4
Update to the tooltip.js to add an aria-label attribute that contains the original title of the element, but only if the element doesn't have an existing aria-label attribute. This is to address cases where screen readers are not capturing the aria-describedby attribute that is added when the tooltip is triggered. This should also avoid a race condition between the screen reader and the appearance of the tooltip.
2020-11-29Remove setData from construtors (#32264)Rohit Sharma1-1/+0
2020-11-29Move `VERSION` to BaseComponent (#32254)Rohit Sharma1-5/+0
2020-11-29add dispose in base componentJohann-S1-3/+1
2020-11-29create a base componentJohann-S1-37/+35
2020-11-25Ability to add custom class in tooltip/popover (#32217)Rohit Sharma1-0/+7
Porting of #31834 to main. Co-authored-by: XhmikosR <[email protected]>
2020-11-21Be consistent with Popper's name. (#32224)XhmikosR1-1/+1
The npm package is named "popper.js" but the project is named "Popper", so use the latter consistently.
2020-11-14Switch to `Set#has()`XhmikosR1-2/+2
2020-11-14Switch to `String.includes()`XhmikosR1-1/+1
2020-11-14tooltip.js: deduplicate `_fixTitle()` (#32124)XhmikosR1-7/+4
2020-11-14Add `bs` in data attributesRohit Sharma1-3/+3
- Add `bs` in data APIs everywhere - Update unit tests
2020-11-11Prepare v5.0.0-alpha3 (#32122)v5.0.0-alpha3XhmikosR1-2/+2
2020-11-01Streamline jQuery comment. (#32016)XhmikosR1-1/+1
2020-11-01Fix TypeError when Bootstrap is included in `head` (#32024)Sascha1-11/+14
* extend jquery after domContentLoaded event is fired * add unittest for util onDOMContentLoaded * wait for trigger jquery event after domContentLoaded * remove domcontentready from eventHandler * move istanbul ignore statements to correct line Co-authored-by: XhmikosR <[email protected]>
2020-09-29Prepare v5.0.0-alpha2. (#31748)v5.0.0-alpha2XhmikosR1-2/+2
2020-09-24fix tooltip hide method when already hidden (#31115)Hiws1-0/+4
Co-authored-by: XhmikosR <[email protected]>
2020-07-12Add parentheses around multiple spread conditionsXhmikosR1-2/+2
2020-07-12tooltip.js: remove variable used once.XhmikosR1-2/+1
2020-07-12Unbreak lines.XhmikosR1-6/+5
2020-06-19Change whitelist to allowlist (#31066)Patrick H. Lauke1-6/+6
Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2020-06-18Fix tooltip when hovering a children element (delegateTarget) (#30928)Tanguy Krotoff1-9/+9
Co-authored-by: XhmikosR <[email protected]>
2020-06-17Unbreak short linesXhmikosR1-5/+1
2020-06-16Rename "master" to "main". (#31050)XhmikosR1-1/+1
2020-05-13Bump version to 5.0.0-alpha1 (#29925)XhmikosR1-2/+2
Also add v4.5.0 in versions and keep README.md pointing to v4.5.0 so that there are no broken stuff.
2020-04-28Drop closest from SelectorEngine (#30653)Martijn Cuppens1-2/+2
Co-authored-by: XhmikosR <[email protected]>
2020-04-17Replace event.delegateTarget with event.targetTanguy Krotoff1-9/+9
No need for fixEvent() anymore
2020-04-09Pass multiple classes to `classList.add` / `classList.remove` (#30537)XhmikosR1-2/+1
This is supported by our currently supported browsers.
2020-03-29Use `textContent` instead of `innerText`. (#30462)XhmikosR1-2/+2
It's supported by all of our supported browsers.