Implement event.fromElement and event.toElement
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Tracking
()
| Webcompat Priority | P3 |
People
(Reporter: beaven+firefox, Unassigned)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce:
Actual site is behind a login but this is what the popup says--
A javascript error has occurred.
Error reference ID: 1553716576679
Error location: Line #135 of https://www.360-value.com/iv/xv2scripts.js (/ComMenu.jsp)
Error message: TypeError: event.fromElement is undefined
Information about this error has been sent to 360Value.
Click OK to continue or Cancel to reload the page
Actual results:
Popup message.
Expected results:
The text should be displayed instead of an error message.
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Hi,
Can you please attach more specific steps so I can try to reproduce this issue? I tried to access https://www.360-value.com/apps/iv/Login and no error appears by hovering on any element from the page.
Unfortunately, you need to be logged in to get the error to replicate. Would a screenshot help?
Comment 3•6 years ago
|
||
Yes, please attach a screenshot. Thank you!
Meanwhile, I will set a component to this issue and leave it Unconfirmed for the moment, due to the fact that login is needed.
Comment 4•6 years ago
|
||
The script at https://www.360-value.com/iv/xv2scripts.js assumes when window.event is present, the browser is IE and therefore window.event.fromElement is also present:
function searchMouseOut()
{
// IE calls a mouseout event when scrolling over an inner div. This
// causes the ui to flicker for the create valuation list.
var doIEFix = false;
if (typeof event != 'undefined')
{
doIEFix = true;
}
if (!doIEFix || !event.fromElement.contains(event.toElement) &&!document.getElementById('searchsection').contains(event.toElement))
{
var obj = document.getElementById('searchvalimage');
obj.src = "/iv/images/xv2_search_off.jpg";
}
}
Screenshots:
-
When the page loads, it looks like this-- https://i.imgur.com/Vl9e5es.png
-
When you hover over any of the three graphic icons, this error happens-- https://i.imgur.com/lRxRM3L.png
A menu is supposed to appear when hovering over those icons.
It seems Blink supports fromElement and toElement. I gather these should be in the UI Events spec, but I don't see them there.
annevk, is there a spec for these? If not, do these belong in UI Events or HTML?
(Confirming in the sense that comment 4 looks like code that we'd break now.)
annevk pointed me to https://github.com/w3c/uievents/issues/84 on IRC.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 8•6 years ago
|
||
Just a note for the reported site, the function searchMouseOut() has been updated to not use the window.event sniffing or fromElement/toElement:
function searchMouseOut()
{
var obj = document.getElementById('searchvalimage');
obj.src = "/iv/images/xv2_search_off.jpg";
}
Comment 9•6 years ago
|
||
See bug 1547409. Moving webcompat whiteboard tags to project flags.
Updated•6 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Description
•