Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event bubbling bug in QtWebEngine/Chrome 49 #9681

Comments

@tjallingt
Copy link

Version

2.6.8

Reproduction link

https://jsfiddle.net/ey9c73Lx/

Steps to reproduce

  • Open app in old version of chrome running in QT (don't know the version but the userAgent is: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.7.1 Chrome/49.0.2623.111 Safari/537.36")
  • Click on image or text
  • Click on border of element

What is expected?

The counter should increment for every click on the image or text contained in the div with the @click.

What is actually happening?

Only when clicking on the border the counter is incremented


I'm developing Vue apps that run inside Tableau which is build with QT. The QT version used is quite old and so is the included QtWebEngine fork of Chrome. The upgrade from Vue 2.5 to 2.6 broke event bubbling in this older version of chrome, apparently because event.timeStamp is a very negative number (such as -518605237).

/* add$1 */
e.target === e.currentTarget // false since we are clicking children of the div

e.timeStamp >= attachedTimestamp // false since -518605237 < 0

e.timeStamp === 0 // false since -518605237 != 0

e.target.ownerDocument !== document // false since we are the same document

Maybe there is a way to disable the microtask behaviour for this browser?

@tjallingt
Copy link
Author

Unfortunately it is quite difficult to bisect the problem given that the browser is a chromium fork...
I can only tell that "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.10.0 Chrome/61.0.3163.140 Safari/537.36" does not have this issue but i can't tell when it was fixed so a user agent check would be difficult. Also not sure how to test whether the microtask behaviour would otherwise be correct (in which case the fix might be to add e.timeStamp <= 0 as long as that doesn't interfere with other browsers).

@yyx990803
Copy link
Member

Can you try change the line e.timeStamp === 0 to e.timeStamp <= 0 in your Vue dist file to see if it fixes the issue?

@tjallingt
Copy link
Author

That appears to fix the issue; the counter gets incremented correctly when clicking inside the div after that change

@tjallingt
Copy link
Author

Lovely! ❤️ your amazing work on Vue

kiku-jw pushed a commit to kiku-jw/vue that referenced this issue Jun 18, 2019
Lostlover pushed a commit to Lostlover/vue that referenced this issue Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment