diff --git a/patches/react-contextmenu+2.14.0.patch b/patches/react-contextmenu+2.14.0.patch index 578653f87..5704c3390 100644 --- a/patches/react-contextmenu+2.14.0.patch +++ b/patches/react-contextmenu+2.14.0.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/react-contextmenu/modules/ContextMenu.js b/node_modules/react-contextmenu/modules/ContextMenu.js -index 2f88213..150f93e 100644 +index 2f88213..d41a53c 100644 --- a/node_modules/react-contextmenu/modules/ContextMenu.js +++ b/node_modules/react-contextmenu/modules/ContextMenu.js @@ -81,6 +81,11 @@ var ContextMenu = function (_AbstractMenu) { @@ -40,15 +40,15 @@ index 2f88213..150f93e 100644 _this2.menu.style.opacity = 0; _this2.menu.style.pointerEvents = 'none'; + -+ if (this.previousFocus && this.previousFocus.focus) { -+ this.previousFocus.focus(); -+ this.previousFocus = null; ++ if (_this2.previousFocus && _this2.previousFocus.focus) { ++ _this2.previousFocus.focus(); ++ _this2.previousFocus = null; + } }); } } diff --git a/node_modules/react-contextmenu/modules/SubMenu.js b/node_modules/react-contextmenu/modules/SubMenu.js -index ad1dc70..ef0c960 100644 +index ad1dc70..4604898 100644 --- a/node_modules/react-contextmenu/modules/SubMenu.js +++ b/node_modules/react-contextmenu/modules/SubMenu.js @@ -129,6 +129,7 @@ var SubMenu = function (_AbstractMenu) { @@ -83,7 +83,7 @@ index ad1dc70..ef0c960 100644 _this.state = (0, _objectAssign2.default)({}, _this.state, { visible: false }); -@@ -202,21 +213,24 @@ var SubMenu = function (_AbstractMenu) { +@@ -202,32 +213,28 @@ var SubMenu = function (_AbstractMenu) { if (this.props.forceOpen || this.state.visible) { var wrapper = window.requestAnimationFrame || setTimeout; wrapper(function () { @@ -122,11 +122,14 @@ index ad1dc70..ef0c960 100644 + } }); } else { - var cleanup = function cleanup() { -@@ -227,7 +241,8 @@ var SubMenu = function (_AbstractMenu) { - _this2.subMenu.style.left = '100%'; - _this2.unregisterHandlers(); - }; +- var cleanup = function cleanup() { +- _this2.subMenu.removeEventListener('transitionend', cleanup); +- _this2.subMenu.style.removeProperty('bottom'); +- _this2.subMenu.style.removeProperty('right'); +- _this2.subMenu.style.top = 0; +- _this2.subMenu.style.left = '100%'; +- _this2.unregisterHandlers(); +- }; - this.subMenu.addEventListener('transitionend', cleanup); + this.subMenu.removeEventListener('transitionend', this.cleanup); + this.subMenu.addEventListener('transitionend', this.cleanup);