Commit 942dd4c
Don't dismiss tooltips on scroll while focus is inside them
Summary:
Click-triggered tooltips (like the commit filter dropdown) dismiss on any
scroll event outside tooltip content, to avoid lingering after their anchor
moves. But typing into an input inside a tooltip can shrink content elsewhere
on the page (e.g. live-filtering the commit tree), which clamps the scroll
container's `scrollTop` and fires a scroll event — dismissing the tooltip out
from under the user mid-keystroke.
Keep the scroll-dismissal behavior, but skip it while `document.activeElement`
is inside a tooltip: if the user is typing in it, it should stay up.
Reviewed By: evangrayk
Differential Revision: D116539937
fbshipit-source-id: b702b524ac3973406c90b0016992403db7f52b221 parent f83f89a commit 942dd4c
2 files changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
161 | 164 | | |
162 | 165 | | |
163 | 166 | | |
| |||
225 | 228 | | |
226 | 229 | | |
227 | 230 | | |
228 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
229 | 236 | | |
230 | 237 | | |
231 | 238 | | |
| |||
298 | 305 | | |
299 | 306 | | |
300 | 307 | | |
| 308 | + | |
301 | 309 | | |
302 | 310 | | |
303 | 311 | | |
| |||
334 | 342 | | |
335 | 343 | | |
336 | 344 | | |
| 345 | + | |
337 | 346 | | |
338 | 347 | | |
339 | 348 | | |
| |||
342 | 351 | | |
343 | 352 | | |
344 | 353 | | |
| 354 | + | |
345 | 355 | | |
346 | 356 | | |
347 | 357 | | |
348 | 358 | | |
349 | | - | |
350 | 359 | | |
351 | 360 | | |
352 | 361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
0 commit comments