I need to prevent the scroll caused by focus().
For this purpose, I found that if I use element.focus({preventScroll : true}) instead of element.focus(), it works fine, based on the documentation from mozilla.
However, this only works perfectly on Chrome but not in Firefox.
I'm wondering how could it be not supported by FireFox, when the documentation has been done by Mozilla.
Am I missing something here?
Focus method documentation by Mozilla
Related
When I run this simple code in console :
performance.mark('start-mark');
performance.mark('stop-mark');
performance.measure('name','start-mark','stop-mark');
performance.measure returns PerformanceMeasure object (as in documentation https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure). The problem is that everything works fine in chrome, edge and safari. Unfortunately in firefox it reutrns undefined.
Beside documentation I checked also in caniuse.com and it should work.
Can you help me to run this "code" in firefox (version 93 - actual).
This appears to be a known implementation inconsistency in Firefox.
From https://developer.mozilla.org/en-US/docs/Web/API/Performance/measure#browser_compatibility):
I worked around this using Performance.getEntriesByName:
performance.mark('start-mark');
performance.mark('stop-mark');
performance.measure('name', 'start-mark', 'stop-mark');
console.log(performance.getEntriesByName('name', 'measure')[0]);
When I try to run following function on chrome.
window.find("text",false,false,true,false,false,true);
according to the documentation here
https://developer.mozilla.org/en-US/docs/Web/API/Window/find
and here
http://help.dottoro.com/ljkjvqqo.php
This is supposed to show the search Dialog box.
I have tested. It works with firefox but not with chrome.
Any possible solutions?
This code works fine in Firefox window.opener.insertHTML but it doesnot work for IE. I just noticed that this code works even for IE9 but its not working for IE8
How can i get it to work for both the browsers?
The insertHTML command is for documents in design mode. It is a Mozilla invention and apparently isn't supported by IE.
Please try with pasteHTML insted of InsertHtml.
I have made a simple embed of slideshare on my site. However, on Internet Explorer, it keeps saying "Loading" and nothing appears. However, in Firefox its almost instant. Please try here using internet explorer.
Or is it just me? It makes use of Flash and Javascript.
What can the problem be?
Thanks all for any hellp
This page works fine in IE9 at least, and the content you say is broken was written in Flash. You might want to watch your HTTP traffic using Fiddler (www.fiddler2.com) and check for script errors using IE's developer tools (hit F12).
I've check it in Chrome, Firefox, IE6/7/8 and they all seem fine. I haven't checked it in Opera or Safari though.
I'm using the code that netadictos posted to the question here. All I want to do is to display a warning when a user is navigating away from or closing a window/tab.
The code that netadictos posted seems to work fine in IE7, FF 3.0.5, Safari 3.2.1, and Chrome but it doesn't work in Opera v9.63. Does anyone know of way of doing the same thing in Opera?
Thx, Trev
Opera does not support window.onbeforeunload at the moment. It will be supported in some future version, but has not been a sufficiently high priority to get implemented as of Opera 11.
onbeforeunload is now supported in Opera 15 based on the WebKit engine but not in any prior versions based on Presto.
Have you tried this?
history.navigationMode = 'compatible';
Reference, found via this page
I haven't actually tried it myself, but it looks promising.
Mobile Safari (iPhone/iPad) also doesn't support onbeforeunload, and I strongly suspect it is not likely to.
For detecting back/forward navigation there may be workarounds e.g. see Is there an alternative method to use onbeforeunload in mobile safari?.