New issue
Advanced search Search tips

Issue 685276 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

onerror return value not handled correctly for non-ErrorEvent events

Reported by bzbar...@mit.edu, Jan 25 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0

Steps to reproduce the problem:
1. Load the testcase

What is the expected behavior?
All the lines say "event.defaultPrevented: false" except the "event.defaultPrevented: true, value: false" line.

What went wrong?
The first two lines are:

  event.defaultPrevented: true, value: true
  event.defaultPrevented: false, value: false

which is exactly backwards.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 57.0.2987.8 (Official Build) dev (64-bit)  Channel: n/a
OS Version: OS X 10.12
Flash Version: 

Per spec at https://html.spec.whatwg.org/multipage/webappapis.html#the-event-handler-processing-algorithm step 4, the special "true means preventDefault" handling should only happen for ErrorEvent events.

Safari and Edge get this right.  Firefox gets this wrong too; see https://bugzilla.mozilla.org/show_bug.cgi?id=1333838
 
baz.html
699 bytes View Download

Comment 1 by bzbar...@mit.edu, Jan 25 2017

Note also https://github.com/whatwg/html/issues/2296 which is kind of related to this.
Labels: Needs-Triage-M57
Cc: brajkumar@chromium.org
Labels: Needs-Feedback
Tested this issue on Mac OS 10.12 using chrome latest Dev M57-57.0.2987.8 by following steps mentioned in the original comment. By opening the provided html file baz.html observed the below content displayed saying "event.defaultPrevented: true, value: true" "event.defaultPrevented: false, value: false" in first 2 lines.

Tested the same on other browsers like firefox and safari observed the same behavior over there as well.

bzbarsky@ Could you please let us know on which browser this issue is working fine?

Thanks!

Comment 4 by bzbar...@mit.edu, Jan 30 2017

> Tested the same on other browsers like firefox and safari
> observed the same behavior over there as well.

I did say Firefox has the same behavior, yes.  But Safari does not.  Safari 10 shows:

  event.defaultPrevented: false, value: true
  event.defaultPrevented: true, value: false

and so does WebKit nightly.  Are you sure you tested Safari?

> Could you please let us know on which browser this issue is working fine?

I said this in the initial report: Safari and Edge.

Note that I filed https://github.com/whatwg/html/issues/2296 on some subtle aspects of what's going on here on the spec end, so you may want to wait for that to get sorted out before making behavior changes here.
Project Member

Comment 5 by sheriffbot@chromium.org, Feb 6 2017

Labels: -Needs-Feedback Needs-Review
Owner: brajkumar@chromium.org
Thank you for providing more feedback. Adding requester "brajkumar@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Needs-Review -Needs-Triage-M57 OS-Windows
Owner: ----
Status: Untriaged (was: Unconfirmed)
Labels: -OS-Windows -OS-Mac OS-All
Owner: tkent@chromium.org
Surprising that WebKit would get this right and blink would get it wrong.  Did we regress or did WebKit fix it at some point? tkent@ can you please triage?

Comment 8 by bzbar...@mit.edu, Feb 6 2017

WebKit has been doing a ton of IDL and HTML spec compliance work in the last year or two.  There's all sorts of stuff that they get right that you guys get wrong, and not surprising at all to run into things like that, fwiw.

Comment 9 by tkent@chromium.org, Feb 7 2017

Cc: -brajkumar@chromium.org
Components: -Blink>DOM Blink>HTML
Owner: ----
Status: Available (was: Untriaged)
The spec around this has recently been clarified, but the bug here still stands. I added a bunch of tests around error event handling which are present in http://w3c-test.org/html/webappapis/scripting/events/event-handler-processing-algorithm-error/.

Chrome fails the following three:

- http://w3c-test.org/html/webappapis/scripting/events/event-handler-processing-algorithm-error/window-synthetic-event.html
- http://w3c-test.org/html/webappapis/scripting/events/event-handler-processing-algorithm-error/synthetic-errorevent-click.worker.html
- http://w3c-test.org/html/webappapis/scripting/events/event-handler-processing-algorithm-error/workerglobalscope-synthetic-errorevent.worker.html

however the last two are failing partially because ErrorEvent is not exposed in workers, so I am not sure if Chrome's behavior in them is correct or not.
Project Member

Comment 11 by sheriffbot@chromium.org, Apr 6 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)

Sign in to add a comment