Drag and Drop not working in resized editor window in Google Chrome
Question
Hi, I developed some components and all works fine in Firefox, Opera browser.
In Google chrome also working fine in fullscreen editor mode only. But, when resizing the editor screen size(custom width & height), drag and drop is not working for all components. The green bar to point the target drop location is also not showing.
In Some times, It only allows only one component to drag and drop and then it blocks all other components. And No errors are shown in console window.
I tried a lot to fix this issue. Cleaned the cache, But, still i couldn't find a solution. I think when resizing the editor window, some listeners are not registering properly in resized editor window in Google Chrome. Can you give me good a solution for this issue? Thanks.
Answers (3)
Hi, Thanks for your reply. editor.refresh() also didn't work.
But, finally the issue was fixed when updating the google chrome and grapesjs-preset-newsletter.
Can you explain how do you resize the editor?
This is the function i use for resize the window.
function resizeEditor() {
if ($('.detailview-header').length > 0) {
$('#MyTemplateEditor').height(($(window).height() - 150 - $('.detailview-header').outerHeight(true) - 70) + 'px');
} else {
$('#MyTemplateEditor').height(($(window).height() - 150) + 'px');
}
$('#MySettingsContentContainer').height(($('#MyTemplateEditor').height() - 65) + 'px');
}
//This is how i initially resize the editor window
resizeEditor();
$(window).on('resize', resizeEditor);
(the above code works fine in Firefox and Opera browser)Related Questions and Answers
Continue research with similar issue discussions.
Issue #950
Editor.setdevice() not working properly on some browsers.
I am changing the device by using editor.setdevice function by calling it in document.ready function. On most devices it is working fine bu...
Issue #337
IE 11 issue
Can not drop components on canvas in IE 11 but working fine in Firefox, Chrome. While clicking on blocks to drag getting error in console:...
Issue #1022
[BUG] Drag and drop blocks are not working in IE Browser
Hi, There is some bug related to "Drag and drop blocks are not working in IE Browser ", I didn't get better solution regarding this issue....
Issue #1875
[QUESTION] ID changes when importing html or passing html in components prop in config.
Hi, I built a component and block that I can drag and drop in the canvas. My issue is that some styles rely on the ID. I know this might no...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.