Open Bug 1813687 Opened 2 years ago Updated 2 years ago

Only add toggle event listeners for feature callouts anchored to <details> elements

Categories

(Firefox :: Messaging System, task, P3)

task

Tracking

()

People

(Reporter: aminomancer, Unassigned)

References

(Blocks 1 open bug)

Details

When feature callout was originally implemented, their parent elements were always <details> elements. But now, it's possible for callouts to be anchored to anything or nothing at all. And the toggle event only comes from <details> elements. Instead of making the toggle listener an intrinsic part of the feature callout implementation, we should make use of the PageEventManager and move this behavior into the message specification.

Specifically, a message that is supposed to be anchored to a <details> element should specify that it wants to attach a "toggle" event listener to the parent, and the action to perform on this event (basically, the callback) should be a "reposition" action (which hasn't been implemented yet but is easy to do). Then we won't need to try to listen for "toggle" events on elements that cannot dispatch them

I tentatively changed the way these callbacks are set up in bug 1805177, so I'd hold off on this until that either changes or lands

Priority: -- → P3
Blocks: fc-surface
No longer blocks: pdfjs-callout
You need to log in before you can comment on or make changes to this bug.