mirror of https://github.com/zulip/zulip.git
tippy: Remove the focus trigger from the compose-control-buttons.
By default, tippyjs uses a trigger value of 'mouseenter focus', which means that the tooltips can appear either when the element is hovered over or when it receives focus (e.g., by being clicked). Because of this, if you click on the button to open the popover, the tooltip also appears. To prevent this behavior, we need to remove the 'focus' trigger from the buttons so that the tooltips don't appear when the buttons are clicked. Fixes: #25277
This commit is contained in:
parent
19d5fedfd2
commit
c10d33d23c
|
@ -219,6 +219,13 @@ export function initialize() {
|
||||||
// so that regular users don't have to see
|
// so that regular users don't have to see
|
||||||
// them unless they want to.
|
// them unless they want to.
|
||||||
delay: LONG_HOVER_DELAY,
|
delay: LONG_HOVER_DELAY,
|
||||||
|
// By default, tippyjs uses a trigger value of "mouseenter focus",
|
||||||
|
// which means the tooltips can appear either when the element is
|
||||||
|
// hovered over or when it receives focus (e.g. by being clicked).
|
||||||
|
// However, we only want the tooltips to appear on hover, not on click.
|
||||||
|
// Therefore, we need to remove the "focus" trigger from the buttons,
|
||||||
|
// so that the tooltips don't appear when the buttons are clicked.
|
||||||
|
trigger: "mouseenter",
|
||||||
// This ensures that the upload files tooltip
|
// This ensures that the upload files tooltip
|
||||||
// doesn't hide behind the left sidebar.
|
// doesn't hide behind the left sidebar.
|
||||||
appendTo: () => document.body,
|
appendTo: () => document.body,
|
||||||
|
|
Loading…
Reference in New Issue