Skip to content

event.target is null in Chrome on img #7027

@dotnetCarpenter

Description

@dotnetCarpenter

Version

2.5.3

Reproduction link

https://jsbin.com/jafufah/1/edit?html,js,console,output

Steps to reproduce

Only in Chrome (61.0.3163) and sometimes Safari (11.0.1).

  1. Open link to jsbin
  2. Click Run with JS
  3. See that the console first prints a reference of event.target and then null for the same property.

What is expected?

In Firefox, Edge and IE11 the event.target is never null.

What is actually happening?

event.target is null if event is stored in variable until next tick.


I'm not sure if this is a bug in Vue.js or in Chrome but I thought more eyes on the matter will help to clarify.

I first saw this inside a nuxt.js application but it's easy to reproduce in just vue.js, so I guess it's either in vue core or in Chrome (blink/webkit).

I've done the same with an <object> load handler and this has never happen - it's specific to the <img> element or the size of the file to load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions