Commit 9b51d4b
committed
Fix: separate scrollIntoView from click in open_header_menu to drain scroll events
Combining scrollIntoView+click in a single evaluate call caused sporadic
failures in Firefox and Chromium: browsers dispatch scroll events from
scrollIntoView asynchronously (200 ms+ after the call), so they arrived
after the menu opened and after our 150 ms React scroll-to-close guard
expired — immediately closing the menu.
Splitting into two evaluate calls with a 300 ms wait between them ensures
all scroll events fire and drain before the menu opens, so none can trigger
the close listener.
Made-with: Cursor1 parent 83d0404 commit 9b51d4b
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
109 | 118 | | |
110 | 119 | | |
111 | 120 | | |
112 | 121 | | |
113 | 122 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 123 | + | |
119 | 124 | | |
| 125 | + | |
| 126 | + | |
120 | 127 | | |
121 | 128 | | |
122 | 129 | | |
| |||
0 commit comments