[pve-devel] [PATCH widget-toolkit v7 3/3] Toolkit: add override for Ext.dd.DragDropManager
Dominik Csapak
d.csapak at proxmox.com
Tue Jun 21 11:19:56 CEST 2022
to fix selection behavior for Ext.dd.DragZone.
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/Toolkit.js | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/Toolkit.js b/src/Toolkit.js
index a1d291e..b6eacfb 100644
--- a/src/Toolkit.js
+++ b/src/Toolkit.js
@@ -699,6 +699,22 @@ Ext.define('Proxmox.view.DragZone', {
},
});
+// Fix text selection on drag when using DragZone,
+// see https://forum.sencha.com/forum/showthread.php?335100
+Ext.define('Proxmox.dd.DragDropManager', {
+ override: 'Ext.dd.DragDropManager',
+
+ stopEvent: function(e) {
+ if (this.stopPropagation) {
+ e.stopPropagation();
+ }
+
+ if (this.preventDefault) {
+ e.preventDefault();
+ }
+ },
+});
+
// force alert boxes to be rendered with an Error Icon
// since Ext.Msg is an object and not a prototype, we need to override it
// after the framework has been initiated
--
2.30.2
More information about the pve-devel
mailing list