Amit Rathiesh
13aa16a99b
Fix: Popover with hover and click triggers closes on mouseleave ( #41511 )
...
* Fix: Popover with hover and click triggers closes on mouseleave
When a popover is configured with `trigger: 'hover click'`,
if you open it by a click, it would incorrectly close when the
mouse pointer leaves the trigger element. This was because the
`mouseleave` event (part of the hover trigger) would hide the
popover without adequately respecting the click trigger's intent
to keep it open.
This commit modifies the click event listener within `Tooltip.js`
(which Popover extends) to explicitly manage the `_activeTrigger[TRIGGER_CLICK]`
state:
- When a click opens the popover or makes a hover-opened popover
sticky, `_activeTrigger[TRIGGER_CLICK]` is set to `true`.
- When a click closes an already click-activated popover,
`_activeTrigger[TRIGGER_CLICK]` is set to `false`.
The `_leave()` method, called by `mouseleave`, already checks
`_isWithActiveTrigger()`. With `_activeTrigger[TRIGGER_CLICK]`
now accurately reflecting the click state, `_leave()` will not
hide a click-activated popover when the mouse leaves the trigger
element. The popover will now correctly remain open until a
subsequent click closes it.
* Removed `test-popover.html`
* Fix linting issues
* Add unit test
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Julien Déramond <juderamond@gmail.com >
2025-06-03 12:19:24 -07:00
Dmitry
fecd219983
Fix popover remaining open when toggled after being shown ( #40803 )
...
Co-authored-by: Dmitry Sergienko <dmitry.sergienko@codefirst.net >
Co-authored-by: Julien Déramond <juderamond@gmail.com >
2024-09-12 09:45:08 +02:00
Nathan Sarang-Walters
16d80a4ff7
Fix this reference for JavaScript functions ( #38725 )
2024-07-19 07:05:21 +02:00
XhmikosR
953b4b6c1b
Fix various redirects
2024-03-06 09:52:50 +02:00
dependabot[bot]
40c6d8a4bc
Build(deps-dev): Bump eslint-config-xo from 0.43.1 to 0.44.0 ( #39651 )
...
* Build(deps-dev): Bump eslint-config-xo from 0.43.1 to 0.44.0
Bumps [eslint-config-xo](https://github.com/xojs/eslint-config-xo ) from 0.43.1 to 0.44.0.
- [Release notes](https://github.com/xojs/eslint-config-xo/releases )
- [Commits](https://github.com/xojs/eslint-config-xo/compare/v0.43.1...v0.44.0 )
---
updated-dependencies:
- dependency-name: eslint-config-xo
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
* Update .eslintrc.json
* Update .eslintrc.json
* autofix
---------
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com >
2024-02-06 21:46:52 +02:00
XhmikosR
ae43f0c48b
Tweak and re-organize ESLint config ( #38369 )
...
* Tweak and re-organize ESLint config
* merge individual configs to the root config
* enable more eslint-plugin-import rules
* lint markdown files
* Lint
2023-03-29 13:49:30 -04:00
kyletsang
d533e6f33d
Fix tooltip body placement with variation placements
2023-03-25 12:22:15 -07:00
GeoSot
ab049cd4a0
Remove version comment from JavaScript src files ( #38294 )
2023-03-22 09:12:33 +02:00
XhmikosR
cf9454caa0
Release v5.3.0-alpha1 ( #37661 )
...
* Bump version to 5.3.0-alpha1
* Dist
* Add docs versions updates
* Update note in homepage hero
Co-authored-by: Mark Otto <markdotto@gmail.com >
2022-12-24 18:37:22 +02:00
XhmikosR
8f6de23682
Merge branch 'main' into prepare-523
2022-11-22 09:51:29 +02:00
XhmikosR
39589472f7
Bump version to 5.2.3
2022-11-21 20:15:33 +02:00
GeoSot
7e3074c165
fix tooltip/popper disposal inconsistencies ( #37235 )
2022-11-21 20:12:43 +02:00
XhmikosR
2fde88c200
Use Object.entries in more places ( #37482 )
2022-11-13 09:19:11 +02:00
GeoSot
aa9d32dd15
Use explicit imports in our javascript source files ( #36854 )
2022-10-26 08:26:51 +03:00
GeoSot
4cb046a6b8
Boost execute function, being able to handle arguments ( #36652 )
2022-10-07 15:25:00 +03:00
GeoSot
01dc2f5100
fix tooltip/popper disposal inconsistencies ( #37235 )
2022-10-06 11:31:38 +03:00
XhmikosR
961d5ff984
Release v5.2.2 ( #37236 )
...
* Bump version to v5.2.2
* Dist
2022-10-03 10:44:02 +03:00
GeoSot
3bd5756414
fix: add trick to support tooltip selector usage on dynamic created tooltips that utilize title attribute ( #36914 )
2022-09-14 16:24:37 +03:00
XhmikosR
23e50829f9
Release v5.2.1 ( #37098 )
...
* Bump version to v5.2.1.
* Dist
2022-09-07 18:31:39 +03:00
GeoSot
949456984a
Fix tooltip manual toggling ( #37086 )
...
partial regression of SHA: 9b9372e8dd
2022-09-07 11:47:06 +03:00
GeoSot
dfae892801
Re-set tooltip title, on disposal ( #36751 )
...
fix(reg): Re-set tooltip title, on disposal
2022-07-27 17:40:05 +03:00
XhmikosR
edf9c40956
Release v5.2.0 ( #36768 )
...
* Bump version to 5.2.0
* Dist
* Update masthead.html
2022-07-19 18:43:58 +03:00
Louis-Maxime Piton
ed2690608e
Fix on #35679 ( #36668 )
...
* Fix
* .
2022-07-11 16:29:30 -07:00
Nathan Walters
3f324eed02
Handle non-empty whitespace textContent in Tooltip trigger ( #36588 )
2022-07-06 07:15:50 +02:00
GeoSot
4f4b42dd14
Force tooltip and popover to recreate content every time it opens ( #35679 )
2022-06-27 12:58:27 +03:00
louismaxime.piton
c137d11aa2
Re-ordering js default objects
2022-06-01 19:24:45 -07:00
Mark Otto
f7e8ca91e0
Prepare v5.2.0-beta1
2022-05-13 19:44:01 +03:00
Дилян Палаузов
e4b62a920a
src/tooltip.js Optimization
...
Util.findShadowRoot() returns either null or an object.
It cannot return falsy, which allows this optimization.
2022-02-25 09:01:49 -08:00
GeoSot
407af8ac7f
Make event name helper and use it on tooltip & popover to reduce dist sizes ( #35856 )
...
* feat: create eventName getter function in baseComponent
* refactor: use `eventName` getter on tooltip & popover
2022-02-19 15:10:47 +02:00
GeoSot
74f24cdf24
More tooltip refactoring ( #35546 )
...
* Tooltip.js: move `shown` check to method
* Tooltip.js: move Popper's creation to method
* Tooltip.js: merge checks before `hide`
* Tooltip.js: minor refactoring on `toggle` method
2022-01-30 17:39:03 +02:00
XhmikosR
62d86c07f8
Rename variables
2022-01-29 13:25:30 +02:00
GeoSot
65cf77ae3e
Popover/Tooltip: Fix vertical alignment on arrow of tip elements ( #35527 )
...
Regression of #32692
Co-authored-by: XhmikosR <xhmikosr@gmail.com >
2021-12-21 17:19:29 +02:00
GeoSot
e0960b08e0
Tooltip: remove extraneous call to _getConfig() ( #35540 )
...
BaseClass already initializes the config
Co-authored-by: XhmikosR <xhmikosr@gmail.com >
2021-12-15 10:47:32 +02:00
GeoSot
886b940796
Extract Component config functionality to a separate class ( #33872 )
...
Co-authored-by: XhmikosR <xhmikosr@gmail.com >
2021-12-10 18:18:18 +02:00
GeoSot
328f723008
Tooltip: remove title attribute before show & add tests ( #35456 )
2021-12-07 15:51:56 +02:00
GeoSot
385fea49e8
Tooltip/Popover: add underscore prefix to protected functions
2021-12-01 18:00:36 +02:00
GeoSot
bd79d69a73
Tooltip: a simple code-block position change
2021-12-01 18:00:36 +02:00
GeoSot
1f7b83203d
Tooltip: simplify popper check
2021-12-01 18:00:36 +02:00
GeoSot
9b9372e8dd
Tooltip: refactor _hoverState to Boolean to achieve better control
2021-12-01 18:00:36 +02:00
GeoSot
8eacbaa08b
Tooltip: merge timeout functionality
2021-12-01 18:00:36 +02:00
GeoSot
c69ccba08c
Tooltip: Change _enter & _leave to work without arguments
2021-12-01 18:00:36 +02:00
GeoSot
a20e4203fe
Tooltip: Remove redundant config.delay check
...
`config.delay` is always an object after initialization
2021-12-01 18:00:36 +02:00
GeoSot
724663b3cd
Tooltip: Remove Data.set usage for dynamically created tip
...
This is not used any further, so we were just setting it.
2021-12-01 18:00:36 +02:00
GeoSot
3baeb0a5c1
Tooltip: merge isAnimated checks
2021-12-01 18:00:36 +02:00
GeoSot
53c77c0203
Tooltip: refactor jQueryInterface
2021-12-01 18:00:36 +02:00
GeoSot
cab62af2e6
Fix popover arrow & tooltip template after the setContent addition ( #35441 )
2021-12-01 15:10:10 +02:00
GeoSot
44a6cd724c
Tooltip: remove leftover method ( #35440 )
...
Remove a leftover after #32692
Co-authored-by: XhmikosR <xhmikosr@gmail.com >
2021-12-01 14:53:56 +02:00
GeoSot
6f077ff7bc
Clean tooltip component unneeded functionality ( #32692 )
2021-11-25 20:08:11 +02:00
GeoSot
374eeecfbc
tooltip.js: use array.includes instead of for iteration ( #35127 )
2021-11-25 19:39:13 +02:00
GeoSot
94a596fbcb
Add a template factory helper to handle all template cases ( #34519 )
...
Co-authored-by: XhmikosR <xhmikosr@gmail.com >
2021-11-25 19:14:02 +02:00