From 8ad6b0a9bc14fa98564ae43ed4447564233f3b04 Mon Sep 17 00:00:00 2001 From: Daniel Carneiro Date: Fri, 10 May 2019 08:27:33 +0100 Subject: [PATCH 1/6] commented line on jquery.event.drag to avoid conflicts with froala --- lib/jquery.event.drag-2.3.0.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jquery.event.drag-2.3.0.js b/lib/jquery.event.drag-2.3.0.js index 596247e6..72e4129d 100644 --- a/lib/jquery.event.drag-2.3.0.js +++ b/lib/jquery.event.drag-2.3.0.js @@ -79,7 +79,7 @@ // store the interaction data $.data( this, drag.datakey, data ); // bind the mousedown event, which starts drag interactions - $event.add( this, "touchstart mousedown", drag.init, data ); + // $event.add( this, "touchstart mousedown", drag.init, data ); // Commented to avoid froala click issue // prevent image dragging in IE... if ( this.attachEvent ) this.attachEvent("ondragstart", drag.dontstart ); From 92e0d19a2ffa4f76e3b2a655827cd6d05e15e427 Mon Sep 17 00:00:00 2001 From: Daniel Carneiro Date: Fri, 10 May 2019 08:55:02 +0100 Subject: [PATCH 2/6] Update README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 0a79d686..ef95d38c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +## Apply the Fix to your project + +To apply this fix to your current project you just need to add slickgrid as a dependency on package.json: + +`"slickgrid": "git+https://github.com:loonix/SlickGrid.git",` + + ## This is the 6pac SlickGrid repo Check out the NEW SlickGrid Website! http://slickgrid.net/ From df93ae0546f22a414888af1e90accd59b4e0d7d8 Mon Sep 17 00:00:00 2001 From: Daniel Carneiro Date: Fri, 10 May 2019 08:57:50 +0100 Subject: [PATCH 3/6] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index ef95d38c..3ca4f637 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +## What is the fix for? + +This fix is to avoid conflicts with Slickgrid and Froala, if you use both on the same project, the jquery.event.drag will disable the clicks on froala so you will be unable to click/select or focus into the editor. + ## Apply the Fix to your project To apply this fix to your current project you just need to add slickgrid as a dependency on package.json: From ff97884a72267c5391724a85ef93c9e1d397139e Mon Sep 17 00:00:00 2001 From: Daniel Carneiro Date: Fri, 10 May 2019 16:13:38 +0100 Subject: [PATCH 4/6] Workaround for Froala and Slickgrid to work --- lib/jquery.event.drag-2.3.0.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/jquery.event.drag-2.3.0.js b/lib/jquery.event.drag-2.3.0.js index 72e4129d..9a6e6e71 100644 --- a/lib/jquery.event.drag-2.3.0.js +++ b/lib/jquery.event.drag-2.3.0.js @@ -79,7 +79,7 @@ // store the interaction data $.data( this, drag.datakey, data ); // bind the mousedown event, which starts drag interactions - // $event.add( this, "touchstart mousedown", drag.init, data ); // Commented to avoid froala click issue + $event.add( this, "touchstart mousedown", drag.init, data ); // prevent image dragging in IE... if ( this.attachEvent ) this.attachEvent("ondragstart", drag.dontstart ); @@ -146,6 +146,12 @@ // locate and init the drop targets if ( dd.drop !== false && $special.drop ) $special.drop.handler( event, dd ); + + // Workaround for Froala and Slickgrid to work + if(!dd.click && dd.distance === 0 && !dd.dragging) { + drag.textselect( true ); + return; + } // disable text selection drag.textselect( false ); // bind additional events... From 441672cbc2d3f3b37f80c3dc2731de7a7ef5fda4 Mon Sep 17 00:00:00 2001 From: Daniel Carneiro Date: Mon, 13 May 2019 08:33:15 +0100 Subject: [PATCH 5/6] changed comment --- lib/jquery.event.drag-2.3.0.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/jquery.event.drag-2.3.0.js b/lib/jquery.event.drag-2.3.0.js index 9a6e6e71..297e67a8 100644 --- a/lib/jquery.event.drag-2.3.0.js +++ b/lib/jquery.event.drag-2.3.0.js @@ -146,8 +146,7 @@ // locate and init the drop targets if ( dd.drop !== false && $special.drop ) $special.drop.handler( event, dd ); - - // Workaround for Froala and Slickgrid to work + // if user is not dragging if(!dd.click && dd.distance === 0 && !dd.dragging) { drag.textselect( true ); return; From dbebf40c38a04c4debe28147d7e5346d8c403705 Mon Sep 17 00:00:00 2001 From: Daniel Carneiro Date: Mon, 13 May 2019 08:37:12 +0100 Subject: [PATCH 6/6] removed text to make pr --- README.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/README.md b/README.md index 3ca4f637..0a79d686 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,3 @@ -## What is the fix for? - -This fix is to avoid conflicts with Slickgrid and Froala, if you use both on the same project, the jquery.event.drag will disable the clicks on froala so you will be unable to click/select or focus into the editor. - -## Apply the Fix to your project - -To apply this fix to your current project you just need to add slickgrid as a dependency on package.json: - -`"slickgrid": "git+https://github.com:loonix/SlickGrid.git",` - - ## This is the 6pac SlickGrid repo Check out the NEW SlickGrid Website! http://slickgrid.net/