Commit c3f1c49
committed
Don't flash a text selection while a press is still resolving
AppKit focuses and select-all's the field as part of routing the very
mouseDown that may turn out to be a drag, so pressing a scrubbable value
showed it highlighted like an open text edit until the drag threshold was
crossed. First responder was handed back, but only once the drag had
already resolved — leaving the selection visible for the whole hold.
Hand it back at the press instead. If the gesture resolves to a drag it's
already in the state a scrub wants; if it resolves to a plain click, the
mouseUp branch focuses it properly and select-all still happens then. The
blur is safe to ignore downstream because the tracking loop blocks the
runloop until the gesture ends, so the deferred focus-loss handling can't
run before either a session is open or focus is restored.1 parent 5fd6cce commit c3f1c49
1 file changed
Lines changed: 14 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
387 | 401 | | |
388 | 402 | | |
389 | 403 | | |
| |||
459 | 473 | | |
460 | 474 | | |
461 | 475 | | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | 476 | | |
474 | 477 | | |
475 | 478 | | |
| |||
0 commit comments