mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 16:14:02 +00:00
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:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user