Possible Duplicate:
Disable doubleclick event for an element in Opera
I've got problem with Opera browser. It's only one that does show up context menu on double left click/selection. I have page with div's which are empty (background images). They have hooked click and contextmenu events and click is working fine when you click slow. If you click twice faster text get's selected. What I observed is that probably main reason for this is using inline-block, just because of treating whole as one line. Here is example code:
<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.8/dojo/dojo.js" data-dojo-config="async: 1"></script>
</head>
<body>
<div style="display: inline-block;">
<table>
<tr>
<th colspan="3">Header</th>
</tr>
<tr>
<td></td>
<td>
<div id="test" style="height: 38px; width: 38px; background: red;">
</div>
</td>
<td></td>
</tr>
</table>
</div>
<div style="display: inline-block;">
<table>
<tr>
<th colspan="3">Header</th>
</tr>
<tr>
<td></td>
<td>
<div id="test" style="height: 38px; width: 38px; background: red;">
</div>
</td>
<td></td>
</tr>
</table>
</div>
</body>
</html>
<script type="text/javascript">
require(["dojo/dom", "dojo/on","dojo/domReady!"], function(dom, on) {
on(dom.byId('test'), 'click', function() { /* do something here */ return false; });
});
</script>
Is it possible to prevent it, leaving inline-block? I'm especially interested in solution with Dojo, if possible.