Bug 1450876 Comment 13 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Henrik Skupin (:whimboo) [⌚️UTC+2] from comment #12)
> I forgot about the install_addon case when writing this patch. Extending the timeout to the set page timeout will actually cause a timeout in those cases. See my comment 5 from 2 years ago. That said we need an early return from navigation when such an install notification pops-up. I wonder how best detect it. Gijs, do you know if there is some kind of event that gets fired for newly opened notifications (doorhanger?)?

There will be a "popupshowing" and "popupshown" event fired on the doorhanger in question. The event bubbles so you can listen for it on the document root and then check the event target to see what is being shown. You probably don't want to do whatever it is you're trying to do for e.g. `tooltip` and context menus showing up. In fact, I also don't understand why you need to return from navigation when a doorhanger pops up... the comments here don't really explain - it sounds to me like the test is just broken and should be fixed, not that navigations should always be canceled by doorhangers, as then you'll have lots of other problems (e.g. every time we show a doorhanger, even for completely different things ("we blocked a tracker!", "you can use reader mode here!", "you bookmarked a thing", "you opened a panel while the navigation was happening"), navigation would break).
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+2] from comment #12)
> I forgot about the install_addon case when writing this patch. Extending the timeout to the set page timeout will actually cause a timeout in those cases. See my comment 5 from 2 years ago. That said we need an early return from navigation when such an install notification pops-up. I wonder how best detect it. Gijs, do you know if there is some kind of event that gets fired for newly opened notifications (doorhanger?)?

There will be a "popupshowing" and "popupshown" event fired on the doorhanger in question. The event bubbles so you can listen for it on the document root and then check the event target to see what is being shown. You probably don't want to do whatever it is you're trying to do for e.g. `tooltip` and context menus showing up.

In fact, I also don't understand why you need to return from navigation when a doorhanger pops up... the comments here don't really explain - it sounds to me like the test is just broken and should be fixed, not that navigations should always be canceled by doorhangers. If doorhangers were to always cancel navigation, you'd have lots of other problems (e.g. every time we show a doorhanger, even for completely different things ("we blocked a tracker!", "you can use reader mode here!", "you bookmarked a thing", "you opened a panel while the navigation was happening"), navigation would break).

Back to Bug 1450876 Comment 13