Page MenuHomePhabricator

Watchstar causes ResizeObserver error; cannot unwatch page; breaks page tools
Open, Needs TriagePublicPRODUCTION ERROR

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • The tools menu closes. If I click it again it won't open. If I click it again I get a ResizeObserver loop error
  • The article remains unwatched/watched.

What should have happened instead?:

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Restricted Application changed the subtype of this task from "Bug Report" to "Production Error". · View Herald TranscriptMay 1 2026, 6:48 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Introduced in rMWd465165996fa: Switch watchstar from Popover to Dialog (which was cherry picked to .26)

Commenting out the below seems to resolve the issue - does a dialog still need to care if the anchor is scrolled off-screen (as you can't scroll while a dialog is open, right?)
I think you (@Samwilson) were talking about something similar today..

diff --git a/resources/src/mediawiki.watchstar.widgets/WatchlistPopup.vue b/resources/src/mediawiki.watchstar.widgets/WatchlistPopup.vue
index c22cdfac5f8..a17991f86a7 100644
--- a/resources/src/mediawiki.watchstar.widgets/WatchlistPopup.vue
+++ b/resources/src/mediawiki.watchstar.widgets/WatchlistPopup.vue
@@ -281,14 +281,14 @@ module.exports = defineComponent( {

                // If the popover anchor is scrolled off-screen then close the popover.
                // eslint-disable-next-line compat/compat
-               const intersectionObserver = new IntersectionObserver( ( entries ) => {
-                       isOpen.value = entries.length && entries[ 0 ].isIntersecting;
-               } );
-               intersectionObserver.observe( anchor.value );
+               //const intersectionObserver = new IntersectionObserver( ( entries ) => {
+               //      isOpen.value = entries.length && entries[ 0 ].isIntersecting;
+               //} );
+               //intersectionObserver.observe( anchor.value );

                const openPopup = function ( newAnchor ) {
-                       intersectionObserver.unobserve( anchor.value );
-                       intersectionObserver.observe( newAnchor );
+                       //intersectionObserver.unobserve( anchor.value );
+                       //intersectionObserver.observe( newAnchor );
                        anchor.value = newAnchor;
                        isOpen.value = true;

Change #1281659 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/core@master] Watchstar popup: remove unneeded interaction observer

https://gerrit.wikimedia.org/r/1281659

Change #1281659 merged by jenkins-bot:

[mediawiki/core@master] Watchstar popup: remove unneeded interaction observer

https://gerrit.wikimedia.org/r/1281659