From d720ce4b4e7cd3bd0144e925f8a8efe2fa911fec Mon Sep 17 00:00:00 2001 From: Karl Stolley Date: Tue, 30 May 2023 12:56:38 -0400 Subject: [PATCH] popovers: Register mobile compose tooltip on button container. This ensures that the click event on the mobile `+` button for showing the compose tooltip is registered on a different element from the tooltip for showing the `C` shortcut menu. --- web/src/popover_menus.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/src/popover_menus.js b/web/src/popover_menus.js index e0ad80d97b..eba00f17ae 100644 --- a/web/src/popover_menus.js +++ b/web/src/popover_menus.js @@ -386,7 +386,12 @@ export function initialize() { // that could possibly obstruct user from using this popover. delegate("body", { ...default_popover_props, - target: ".compose_mobile_button", + // Attach the click event to `.mobile_button_container`, since + // the button (`.compose_mobile_button`) already has a hover + // action attached, for showing the keyboard shortcut, + // and Tippy cannot handle events that trigger two different + // actions + target: ".mobile_button_container", placement: "top", onShow(instance) { popover_instances.compose_mobile_button = instance;