I ran across a very odd issue using the following code in the HTMLviewer document complete event
me.ExecuteJavaScript "document.addEventListener('dragover', function(event){event.preventDefault();}, false);"
me.ExecuteJavaScript "document.addEventListener('dragenter', function(event){event.preventDefault();}, false);"
me.ExecuteJavaScript "document.addEventListener('drop', function(event){event.preventDefault();}, false);"
Here is the odd part, I am using Webkit as the render in Windows (WIndows 10 in this case) I have a few different Windows in my Application, everything works fine on Mac OS X, in Windows I use 2 different Windows (sound confusing) that have HTMLViewer’s in them. Both use the above code in the document complete section.
One works without any issue, the other that I have that code (and nothing else in the document complete area) it will freeze Xojo on trying to run it from the editor. It hard locks the mydebug folder and makes Xojo useless until I reboot windows and delete that mydebug folder. The mydebug folder can not be deleted not matter hwat I try without a reboot.
So here is my question.
Why does
me.ExecuteJavaScript "document.addEventListener('dragover', function(event){event.preventDefault();}, false);"
me.ExecuteJavaScript "document.addEventListener('dragenter', function(event){event.preventDefault();}, false);"
me.ExecuteJavaScript "document.addEventListener('drop', function(event){event.preventDefault();}, false);"
Works completely fine in Mac, but works only in one of my app’s Windows, but not in another Window in the same app and it freezes Xojo. This is the exact same code that was copied and pasted in the 1st window that doesnt work in the 2nd htmlviewer document complete event handler.
Any ideas? Nothing fancy is going on here, if I exclude the code from the 2nd htmlviewer event the app runs on windows.