Ignore leading edge of find-by-DOM throttle
Dan Abramov committed
Apr 20, 2019 at 22:17 UTC
006e03c38e191303b797cb69c35cec1f1069c7cd
1 file changed
+4
-1
src/backend/agent.js
+4
-1
@@ -525,6 +525,9 @@ export default class Agent extends EventEmitter {
525
this._bridge.send('selectFiber', id);
526
}
527
}),
528
- 200
528
+ 200,
529
+ // Don't change the selection in the very first 200ms
530
+ // because those are usually unintentional as you lift the cursor.
531
+ { leading: false }
532
);
533
}