So, I have one issue regarding elements with javascript inside innerHTML: it keeps on top of everything else and I can’t interact with some elements that are on top of this element.
So this is what happening in my document/project:
- I have one rectangle that I had put some HTML in it with some javascript;
- I have created 2 SYMBOLS which I configured them to have some actions on swipe left or swipe right that are on top of the box mentioned above;
- when I try to preview or export the document, the swipes on the symbols won’t work because of the box with the javascript. Seems like the box is on top of it even if it’s not (the z-index are correct).
You may give me advice to use a HTML Widget element instead, and it works, but with the HTML Widget element I can’t scroll the content on Chrome for Android (as it generates an iframe) and in the actual version of Chrome an iframe makes the scrollbar stays fixed on the top (as I stated in this topic: Chrome bug: rendering scrollable iframe (seems fixed for desktop, still buggy for Android)). As this seems to be a browser bug, I can’t rely on the developers to fix them as I need to get this done by this week.
I’m using the following script in my project: http://vnjs.net/www/project/freewall/
This is the script I’m using inside the innerHTML (if I remove it, I can interact with the symbols, but the script won’t work, even if I put on the HEAD):
$(function() {
$(".free-wall").each(function() {
var lwidth = $(window).width();
var wall = new freewall(this);
wall.reset({
selector: '> div',
animate: true,
cellW: 320,
cellH: 160,
onResize: function() {
var cwidth = wall.container.width();
wall.container.find('.full-width')
.each(function(index, item){
wall.fixSize({
block: item,
width: cwidth
});
});
wall.fitWidth();
},
});
wall.fitWidth();
});
$(window).trigger("resize");
});
Any advices?
In short, all I want to do is to create 2 hotspots on the left and right sides of the project where the user can swipe LEFT or RIGHT to bring some menus (like most of mobile apps). I created 2 SYMBOLS because symbols can use the on swipe left and on swipe right. I tried with the regular on drag action but it is not precise (if I drag on the horizontal axis but even going a little bit vertical, it still activates the menus).
This is a clean file which I reproduced the error: innerhtml_and_symbols_issue-001.hype.zip (21.9 KB)
This is a video I recorded to illustrate the error: http://kazuhiro.nishi.co/allen/upoint/temp/innerhtml_and_symbols_issue-001.mp4
Thanks in advance.