actual/patches/downshift+1.31.16.patch

22 lines
937 B
Diff
Raw Permalink 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 f39a298..da7b6f5 100644
2022-04-29 02:44:38 +00:00
--- a/node_modules/downshift/dist/downshift.esm.js
+++ b/node_modules/downshift/dist/downshift.esm.js
@@ -1200,10 +1200,15 @@ var _initialiseProps = function () {
2022-04-29 02:44:38 +00:00
// 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
});