
why <iframe> on firefox mobile when losing focus to <input> stop working and upon resetting iframe.document.body.innerHTML vertical scroll bars are disabled?
I have 2 questions (example URL below):
1) if I have an <input> element with position: fixed so the html page scrolls down but leaves <input> at top, each time I click using mobile into <input> the whole html page in Firefox scrolls up.
how to stop this?
2)
I created a scroll bar with <input>. when typing and clicking inside this <input> aI have to repaint html on displayed iframe for vertical scrollbars to appear again.
the only way to repaint vertical scrollbars in iframe for all browers is like this:
if($(event.target).closest('#searchbar').length) { if($('#searchbarresults').is(":hidden")) { if(document.getElementById('searchbar').value.length > 0) { $('#searchbarresults').show(); $('#searchbarframe').show();
doc = document.getElementById("searchbarframe").contentWindow.document;
// get the HTML data
var x = doc.body.innerHTML;
// repaint the HTML data - wow, vertical scrollbars re-appears
doc.body.innerHTML = x;
}
In Firefox desktop and mobile, vertical scrollbars don't retain original position and html is displayed again from the top to down. In Firefox mobile, the entire iframe area is turned off and nothing I can do aside from typing something else in searchbar to reset iframe src can reset iframe to work.
... is there a document.getElementById("searchbarframe").contentWindow.SOMEKINDOFCOMMAND to enable vertical scrollbars or the window itself so I can use my finger and scroll up and down?
This is a super problem with Firefox and I will pass along the URL to test to people who will try to fix this in FireFox. I don't want to post URL here in public. Contact me via email. Thanks