Closed Bug 78798 Opened 24 years ago Closed 22 years ago

window.status requires return false when combined with addEventListener

Categories

(Core :: DOM: Events, defect)

x86
Windows 2000
defect
Not set
minor

Tracking

()

RESOLVED WONTFIX
Future

People

(Reporter: mail, Assigned: joki)

Details

(Keywords: dom2)

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.8.1+) Gecko/20010501 BuildID: 2001050104 To replace the status message using window.status, normally a return true value is required in the event handler. However, when the event handler is added using addEventListener, return false is required. This is inconsistent, and may be a bug, unless there is a reason that addEventListener should return false in this case. Reproducible: Always Steps to Reproduce: 1. Run attached testcase. 2. mouseover the links 3. the status message changes for 1 and 3, but not 2. It should, if I am correct, change for 1 and 2 but not 3. Actual Results: status message changes with addEventListener only with return false Expected Results: status message changes with addEventListener only with return true
Keywords: dom2
Priority: -- → P5
Attached file testcase
Priority: P5 → --
I'm marking this future as low priority for two reasons. One, the fact that to block default browser action you return true for the mouseover event and false for almost every other event has always been annoying, though we support it out of necessity. I wouldn't mind seeing it goes away but for 4.x pages this does work correctly in 6.x Two, anyone using AddEventListener isn't a 4.x page and is using the new DOM standard and should be using PreventDefault(), not return true/false, to achieve the prevention of the browser action.
Target Milestone: --- → Future
Agreed on both points. Thanks for the clarification.
From the coments I dont think this should be fixed at all. It makes much more sence to return false to block the default action, since thats how it works for any other events. The only reason onmouseover needs to return true is for backwards compatibility. Reopen if you disagree.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: