Closed
Bug 39939
Opened 26 years ago
Closed 26 years ago
onmouseover(event) and text frames
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
People
(Reporter: andrew.ng, Assigned: joki)
Details
Attachments
(2 files)
onmouseover and onmouseout events only fires when the mouse is exactly on the
edges of a table cell. When the mouse moves into the content of the table cell,
the onmouseover and onmouseout events doesn't fire.
Attached example of a table with 2 cells:
<HTML>
<BODY>
<SCRIPT>
function MenuOver(e) {
var el
if (document.all)
el = event.srcElement;
else
el = e.target;
el.style.background = "red";
}
function MenuOut(e) {
var el
if (document.all)
el = event.srcElement;
else
el = e.target;
el.style.background = "yellow";
}
</SCRIPT>
<TABLE >
<TR>
<TD style="background-color:yellow" onmouseover='MenuOver(event);'
onmouseout='MenuOut(event);'>Apple</TD>
<TD style="background-color:yellow" onmouseover='MenuOver(event);'
onmouseout='MenuOut(event);'>Orange</TD>
</TR>
</TABLE>
</HTML>
Comment 1•26 years ago
|
||
I also see this on Linux, build 2000051908. Andrew, for future refence, bugzilla
has an attachment feature so you can make your test code live, instead of
pasting it into a comment.
both onmouse events also print out:
JavaScript error:
file:///home/jmd/test.html line 22: el.style has no properties
OS: Windows NT → All
Comment 2•26 years ago
|
||
Jeremy, thanks for creating the attachment for me, I'll make sure I'll have one
next time when I post a bug.
About the javascript error that it generates, I think it's related to the bug
itself. The error message is generated whenever the mouse is over the table
cell text which supposedly should trigger the onmouseover event but it
doesn't. The text is inside the <TD> element which has a onmouseover event
from it's parent table where the event is defined.
Comment 5•26 years ago
|
||
The problem occurs when the event target points to the text frame within the
table cells (or any other block elements for that matter). See the testcase that
I'm going to attach.
This problem seems to preclude us from using "onmmouseover(event)" wherever we
have text frames... A solution could be to:
- dispatch a MouseOver event when entering the text frame if we didn't dispatch
it yet for the container frame
- not dispatch a MouseOut event when moving from the container frame to the text
frame
Reassigned to Event Handling.
Assignee: pierre → joki
Status: UNCONFIRMED → NEW
Component: Layout → Event Handling
Ever confirmed: true
QA Contact: petersen → janc
Summary: onmouseover event for table cells → onmouseover(event) and text frames
Comment 6•26 years ago
|
||
| Assignee | ||
Comment 7•26 years ago
|
||
We have a lot of new objects which fire events now, text nodes being one of
them. Some code written for 4.x will have to be rewritten to deal with this.
Setting as dupe of 14692 which deals with this issue.
*** This bug has been marked as a duplicate of 14692 ***
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
Comment 8•26 years ago
|
||
I don't understand, why this bug has been marked as resolved (and #14692 as
FUTURE).
The behaviour shown in attachement #9237 is definetly wrong and does not conform
to DOM2 event handling. DOM2 clear specifies, that mouse events are bubbling.
Therefore, the mouse over event should bubble from the text frame mentioned in
previous comments to its parent elements. It looks to me as if event bubbling
has been implemented only partially.
Comment 9•25 years ago
|
||
Mass update: changing qacontact to ckritzer@netscape.com
QA Contact: janc → ckritzer
Updated•7 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•