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

The click event cannot be triggered by bubbling in browsers which based on FF. #10864

Closed
wangziling opened this issue Nov 25, 2019 · 4 comments
Closed

Comments

@wangziling
Copy link

@wangziling wangziling commented Nov 25, 2019

Version

2.6.10

Reproduction link

https://codesandbox.io/s/please-test-3rgyj

Steps to reproduce

Using the firefox or other browser which based on firefox.
And its browser core version is bigger than 53.

I used the Basilisk browser - https://www.basilisk-browser.org/download.shtml

The newest version.

And then, please visit: https://codesandbox.io/s/please-test-3rgyj

Click "click me. Should show alert."

What is expected?

Alert: "I want to trigger this."

What is actually happening?

Nothing happened.


I just noticed that, it because of that:

The getnow function is the "/vue/src/core/scheduler.js", 58 line.

The document.createEvent('Event').timeStamp, in this browser, it returned a number with 16 length, e.g. "1574687162023000",
But in normal Firefox browser, it returned a number with 6 length, e.g. "514199".

That's why caused this bug.

In "vue/src/platforms/web/events.js",
The red DOM is rendered after "currentFlushTimestamp" changed to a certain number, so as the the click event initialization.
if the document.createEvent('Event').timeStamp returned 6 length number, it will less than e.timeStamp.

Please check this issue.

@wangziling

This comment has been minimized.

Copy link
Author

@wangziling wangziling commented Nov 25, 2019

I used the vue of development version as external lib, it will be the same if you use production version.

@wangziling

This comment has been minimized.

Copy link
Author

@wangziling wangziling commented Nov 25, 2019

Our QA said that this bug will be recurred in 'Unified XUL Platform (UXP)' based browsers.
I just found that the Basilisk browser maybe a UXP browser.

@posva

This comment has been minimized.

Copy link
Member

@posva posva commented Nov 25, 2019

It may be related to #10515 (regarding Basilisk browsers)

But don't mount Vue instances inside other Vue instances. Declare a component and use it in the template instead of the mounted code in App.vue

@posva posva closed this Nov 25, 2019
@wangziling

This comment has been minimized.

Copy link
Author

@wangziling wangziling commented Nov 25, 2019

OK, got it. In this issue, I just want to show the situation of that triggering events in the another vue instance after triggering some events in previous vue instance.

Thanks for your help. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.