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.
This commit is contained in:
Karl Stolley
2023-05-30 12:56:38 -04:00
committed by Tim Abbott
parent 892c5f48f7
commit d720ce4b4e

View File

@@ -386,7 +386,12 @@ export function initialize() {
// that could possibly obstruct user from using this popover. // that could possibly obstruct user from using this popover.
delegate("body", { delegate("body", {
...default_popover_props, ...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", placement: "top",
onShow(instance) { onShow(instance) {
popover_instances.compose_mobile_button = instance; popover_instances.compose_mobile_button = instance;