this script creates contenteditable div inside the page and when the user still editing this layer and press space key the page scrolling down!
I use this
$(document).on("keypress", function(e) { var $focusElem = $(":focus"); if(e.which == 32 && ($focusElem.is("input") || $focusElem.attr("contenteditable") == "true")){ e.preventDefault(); } });
this script creates contenteditable div inside the page and when the user still editing this layer and press space key the page scrolling down! I use this
$(document).on("keypress", function(e) { var $focusElem = $(":focus"); if(e.which == 32 && ($focusElem.is("input") || $focusElem.attr("contenteditable") == "true")){ e.preventDefault(); } });
but the page still scrolling down!