Open carllrac1 opened 1 year ago
Hi
The data-vvveb-disabled
solutions uses the css pointer-events:none
property to disable mouse events on the element but the element dblclick is still executed on the first parent element that is editable and the text editor is enabled on the parent element and indirectly the child element that has the data-vvveb-disabled
can also be edited.
To avoid this you need to remove pointer-events:none
from data-vvveb-disabled
and handle the data-vvveb-disabled
attribute from javascript code in the event handlers by checking the presence of the attribute on the current element also on mousemove events for the highlighting etc.
You can also use a quick hack like
$("[data-vvveb-disabled]", window.FrameDocument).on("dblclick", function (e) {
e.preventDefault();
return false;
});
$("[data-vvveb-disabled]", window.FrameDocument).parent().on("dblclick", function (e) {
e.preventDefault();
return false;
});
to disable dbclick event on the elements.
I would like to block some sections of my website from being edited, the thing is that I have used data-vvveb-disabled, and although it works, it is not 100% effective. If the content of the section has text and I double click on it, I can edit the text even if the section is disabled.
Any idea how to fix this?