A quick click on IE has a slower response than firefox, chrome and safari. What for? (I am using jquery)

A quick click on IE has a slower response than firefox, chrome and safari. What for? (I am using jquery)

+3
source share
4 answers

This is because Internet Explorer interprets two quick clicks in a line as one click, followed by one double click, while other browsers interpret it as two clicks and double clicks.

Try checking this to see how each browser responds to a double click.

<html>

<head>
<script type='text/javascript'>

function onclick_test()
{
 var console = document.getElementById('console');
 console.appendChild(document.createTextNode('onclick'));
 console.appendChild(document.createElement('br'));
}

function ondblclick_test()
{
 var console = document.getElementById('console');
 console.appendChild(document.createTextNode('ondblclick'));
 console.appendChild(document.createElement('br'));
}

</script>
</head>

<body>

<span style='border:1px solid blue;' onclick='onclick_test();' ondblclick='ondblclick_test();'>Click me</span>

<div id='console'></div>

</body>
</html>
+7
source

   WebKit SunSpider ( JavaScript ). :

JavaScript Performance Rundown
(: ejohn.org)

, IE javascript.

.

+4

JavaScript . IE, , ( ).

+1

, , IE, -, , dblclick , ( dblclick). () , dblclick, , IE ($.browser.msie). , . - , , .

+1

Source: https://habr.com/ru/post/1745028/


All Articles