actual/packages/loot-design/patches/downshift+1.31.14.patch

22 lines
937 B
Diff
Raw Normal View History

2022-04-29 02:44:38 +00:00
diff --git a/node_modules/downshift/dist/downshift.esm.js b/node_modules/downshift/dist/downshift.esm.js
index b89f7d6..4020b47 100644
--- a/node_modules/downshift/dist/downshift.esm.js
+++ b/node_modules/downshift/dist/downshift.esm.js
@@ -1198,10 +1198,15 @@ var _initialiseProps = function () {
// onMouseMove is used over onMouseEnter here. onMouseMove
// is only triggered on actual mouse movement while onMouseEnter
// can fire on DOM changes, interrupting keyboard navigation
- onMouseMove: composeEventHandlers(onMouseMove, function () {
+ onMouseMove: composeEventHandlers(onMouseMove, function (e) {
if (index === _this4.getState().highlightedIndex) {
return;
}
+
+ if(e.movementX === 0 && e.movementY === 0) {
+ return;
+ }
+
_this4.setHighlightedIndex(index, {
type: Downshift.stateChangeTypes.itemMouseEnter
});