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

vue 2.6.9, the click event can't bubble on some browsers such as UC browser on all android 8.x, part android 6.x or 9.x #9729

Comments

@kobe990
Copy link

kobe990 commented Mar 18, 2019

Version

2.6.9

Reproduction link

https://github.com/kobe990/testVue

Steps to reproduce

  1. clone the repository from https://github.com/kobe990/testVue
  2. npm i (including the vue 2.6.9)
  3. npm run dev
  4. use the latest UC browser on android 8.x to open this server URL
  5. we will see two div (one is a parent div, another is a child)
  6. we bind a click event on the parent div
  7. when We click the child div, the click event won't be triggered. If we change the vue version to 2.6.8, It is all right.

What is expected?

the click event can bubble correctly

What is actually happening?

the click event can't bubble correctly in the vue router render page.

@yyx990803
Copy link
Member

Cannot reproduce on Android 9. Is this only for Android 8? Does it affect a specific version of UC browser?

@kobe990
Copy link
Author

kobe990 commented Mar 18, 2019

Thanks for reply. I have tested some mobile phone. currently I find this issue on any UC version on all android 8.x , part of Android 6.x and part of android 9.x. Due to some app also use the js core engine from UC, so the issue also happen in these apps.

@yyx990803
Copy link
Member

This is probably related to this commit: 7591b9d

Can you modify your local Vue.js in node_modules and check what the value of e.timeStamp is in your test case?

@kobe990
Copy link
Author

kobe990 commented Mar 18, 2019

I also find a strange thing:
if I render the page by the vue-router(), This issue happen.
if I don't use the vue-router, it is ok ( in my sample project, If I copy the file 'src/view/mobile/ddbindcard/ddbindcard.vue' to the file 'src/view/mobile/index.vue'), this issue will disappear. So strange.

@kobe990
Copy link
Author

kobe990 commented Mar 18, 2019

test it on the mobile phone where the issue happen, some results are below:
attachedTimestamp is very big, such as: 1552906521442
e.timeStamp is normal, such as: 30791

I think the attachedTimestamp is a little Suspicious, because it's value is small on the normal device

@kobe990
Copy link
Author

kobe990 commented Mar 18, 2019

I debug the node_moudles, I think this is related to this commit: ef2a380

I change it back to before. All things are right

@kobe990 kobe990 changed the title vue 2.6.9, the click event can't bubble on some browsers such as UC browser on android 8.x vue 2.6.9, the click event can't bubble on some browsers such as UC browser on all android 8.x, part android 6.x or 9.x Mar 18, 2019
@vuejs vuejs deleted a comment from baiyaaaaa Mar 18, 2019
@felixbuenemann
Copy link
Contributor

@yyx990803 JSDOM also has low-res timestamps on events, so I think your fix can break on JSDOM.

It would be interesting to find out why this breaks in UC browser.

@felixbuenemann
Copy link
Contributor

Also this switches from feature detection to user agent detection, which is usually not a good idea.

@felixbuenemann
Copy link
Contributor

@kobe990 I can't reproduce with UC Browser for windows, it seems to be based on Chromium.

What exact version did you use? Can I test with the Java-Version on a PC/Mac?

kiku-jw pushed a commit to kiku-jw/vue that referenced this issue Jun 18, 2019
fix vuejs#9729

This reverts vuejs#9667, but also fixes the original issue vuejs#9632 by skipping
the check in IE altogether (since all IE use low-res event timestamps).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment