Fixes contextmenu hover glitch
This commit is contained in:
parent
9ff1c1e50d
commit
04aad09590
2 changed files with 9 additions and 5 deletions
|
@ -1,20 +1,22 @@
|
||||||
diff --git a/node_modules/react-contextmenu/modules/ContextMenu.js b/node_modules/react-contextmenu/modules/ContextMenu.js
|
diff --git a/node_modules/react-contextmenu/modules/ContextMenu.js b/node_modules/react-contextmenu/modules/ContextMenu.js
|
||||||
index 622a1f9..61c8e70 100644
|
index 622a1f9..9fc87ea 100644
|
||||||
--- a/node_modules/react-contextmenu/modules/ContextMenu.js
|
--- a/node_modules/react-contextmenu/modules/ContextMenu.js
|
||||||
+++ b/node_modules/react-contextmenu/modules/ContextMenu.js
|
+++ b/node_modules/react-contextmenu/modules/ContextMenu.js
|
||||||
@@ -226,6 +226,9 @@ var ContextMenu = function (_AbstractMenu) {
|
@@ -226,6 +226,9 @@ var ContextMenu = function (_AbstractMenu) {
|
||||||
|
|
||||||
if (this.state.isVisible) {
|
if (this.state.isVisible) {
|
||||||
var wrapper = window.requestAnimationFrame || setTimeout;
|
var wrapper = window.requestAnimationFrame || setTimeout;
|
||||||
+ if (!this.previousFocus) {
|
+ if (!this.previousFocus) {
|
||||||
+ this.previousFocus = document.activeElement;
|
+ this.previousFocus = document.activeElement;
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
wrapper(function () {
|
wrapper(function () {
|
||||||
var _state = _this2.state,
|
var _state = _this2.state,
|
||||||
@@ -242,12 +245,19 @@ var ContextMenu = function (_AbstractMenu) {
|
@@ -241,13 +244,21 @@ var ContextMenu = function (_AbstractMenu) {
|
||||||
|
_this2.menu.style.top = top + 'px';
|
||||||
_this2.menu.style.left = left + 'px';
|
_this2.menu.style.left = left + 'px';
|
||||||
_this2.menu.style.opacity = 1;
|
_this2.menu.style.opacity = 1;
|
||||||
|
+ _this2.menu.style.visibility = 'visible';
|
||||||
_this2.menu.style.pointerEvents = 'auto';
|
_this2.menu.style.pointerEvents = 'auto';
|
||||||
+
|
+
|
||||||
+ _this2.menu.focus();
|
+ _this2.menu.focus();
|
||||||
|
|
|
@ -9175,6 +9175,7 @@ $contact-modal-padding: 18px;
|
||||||
padding: 6px 0;
|
padding: 6px 0;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
visibility: hidden;
|
||||||
|
|
||||||
@include light-theme {
|
@include light-theme {
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
|
@ -9185,8 +9186,9 @@ $contact-modal-padding: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.react-contextmenu--visible {
|
.react-contextmenu--visible {
|
||||||
z-index: 1000;
|
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.react-contextmenu-item {
|
.react-contextmenu-item {
|
||||||
|
|
Loading…
Reference in a new issue