mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🐛 Fix problem with alt key measures being stuck
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
- Fix problem with alt key measures being stuck [Taiga #9348](https://tree.taiga.io/project/penpot/issue/9348)
|
||||
|
||||
## 2.4.2
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
6
frontend/vendor/mousetrap/index.js
vendored
6
frontend/vendor/mousetrap/index.js
vendored
@@ -976,6 +976,11 @@ Mousetrap.prototype.stopCallback = function (e, element, combo) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Keyup events need to be dispatched always. Otherwise some events can be stuck
|
||||
if (e.type == 'keyup') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ('composedPath' in e && typeof e.composedPath === 'function') {
|
||||
// For open shadow trees, update `element` so that the following check works.
|
||||
const initialEventTarget = e.composedPath()[0];
|
||||
@@ -990,6 +995,7 @@ Mousetrap.prototype.stopCallback = function (e, element, combo) {
|
||||
element.tagName == "TEXTAREA" ||
|
||||
(element.tagName == "BUTTON" && combo.includes("tab")) ||
|
||||
(element.contentEditable && (element.contentEditable == "true" || element.contentEditable === "plaintext-only"));
|
||||
|
||||
return shouldStop;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user