Skip to content

Commit

Permalink
ExtJS 6.2 - fixed drag & drop issues
Browse files Browse the repository at this point in the history
  • Loading branch information
brusch committed Nov 24, 2016
1 parent 78984a6 commit e4e26cf
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions pimcore/static6/js/pimcore/overrides.js
Expand Up @@ -11,7 +11,7 @@
* @license http://www.pimcore.org/license GPLv3 and PEL
*/

Ext.override(Ext.dd.DragDropMgr, {
Ext.override(Ext.dd.DragDropManager, {
startDrag: function (x, y) {

// always hide tree-previews on drag start
Expand All @@ -21,8 +21,22 @@ Ext.override(Ext.dd.DragDropMgr, {
},

handleMouseMove: function (e) {
// stops text selection while dragging
e.preventDefault();

// stops text selection while dragging an element
if(this.dragCurrent) {
e.preventDefault();
}

this.callParent(arguments);
},

handleMouseUp: function(e) {
// bug fix in 6.2.0 ;-(
if(!this.pointerMoveListeners) {
this.pointerMoveListeners = {
destroy: function () {}
};
}

this.callParent(arguments);
}
Expand Down

0 comments on commit e4e26cf

Please sign in to comment.