FF 3.6 vs IE7 -- clicking on inner DIV causing outer DIV onBlur tofire in FF not in IE

T

Tom Y

I suspect that the FF behavior is the correct one but the problem is that the IE behavior is actually what works for my purposes.

Is there something that I can do so that FF will allow the inner DIV to get the onClick without the outer DIV seeing onBlur?

Thanks.
 
E

Elegie

On 12/07/2011 02:52, Tom Y wrote :

Hi Tom,
Is there something that I can do so that FF will allow the inner DIV to get the onClick without the outer DIV seeing onBlur?

Unfortunately I have Firefox 5 and not 3.6, but cannot reproduce the
issue in it. Would you mind posting a quick test case demonstrating the
problem?

I have tried the following script. When you click on the inner DIV, no
blur event is dispatched. Do you have one in FF 3.6?

---
<!DOCTYPE html>
<html>
<head><title>Test Div ONblur</title>
<body>
<div id="outer">Outer Div<div id="inner">Inner Div</div></div>
<script type="text/javascript">
var innerDiv = document.getElementById("inner");
var outerDiv = document.getElementById("outer");
function showEvent(evt) {alert((evt || window.event).type);}
innerDiv.onclick = showEvent;
outerDiv.onblur = showEvent;
</script>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top