You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minimal reproduction does not work because I can not test on my browser or at least I do not know how to turn off Hi Res timers in chrome.
What is expected?
Events to propogate. e.g. an outter div will fire v-on:click for child elements.
What is actually happening?
It's not
in file vue.runtime.esm.js:
change lines 4259 to 4281 to fix:
// Async edge case fix requires storing an event listener's attach timestamp.
var getNow = Date.now;
var baseNow = Date.now();
// Determine what event timestamp the browser is using. Annoyingly, the
// timestamp can either be hi-res (relative to page load) or low-res
// (relative to UNIX epoch), so in order to compare time we have to use the
// same timestamp type when saving the flush timestamp.
// All IE versions use low-res event timestamps, and have problematic clock
// implementations (#9632)
if (inBrowser && !isIE) {
var performance = window.performance;
if (
performance &&
typeof performance.now === 'function' &&
getNow() > document.createEvent('Event').timeStamp
) {
// if the event timestamp, although evaluated AFTER the Date.now(), is
// smaller than it, it means the event is using a hi-res timestamp,
// and we need to use the hi-res version for event listener timestamps as
// well.
getNow = function () { return performance.now(); };
} else {
getNow = function () { return Date.now() - baseNow; };
}
}
The text was updated successfully, but these errors were encountered:
Click "Toggle" 3 times so that it attaches and reattaches the component. Then clicking "Text 1" should update ts. But it does not because the event does not propagate to the parent.
Note the problem only shows up in browsers that the if statement in vue.runtime.esm.js line 4271 evals to false.
I first noticed the propagation problem in vue.runtime.esm.js line 6910.
That lead me to the fix on I stated.
The solution was in the notes at the bottom of the issue.
Version
2.6.12
Reproduction link
https://jsfiddle.net/chrisvfritz/50wL7mdz/
Steps to reproduce
Run in on a browser without hi-res timers.
Minimal reproduction does not work because I can not test on my browser or at least I do not know how to turn off Hi Res timers in chrome.
What is expected?
Events to propogate. e.g. an outter div will fire v-on:click for child elements.
What is actually happening?
It's not
in file vue.runtime.esm.js:
change lines 4259 to 4281 to fix:
// Async edge case fix requires storing an event listener's attach timestamp.
var getNow = Date.now;
var baseNow = Date.now();
// Determine what event timestamp the browser is using. Annoyingly, the
// timestamp can either be hi-res (relative to page load) or low-res
// (relative to UNIX epoch), so in order to compare time we have to use the
// same timestamp type when saving the flush timestamp.
// All IE versions use low-res event timestamps, and have problematic clock
// implementations (#9632)
if (inBrowser && !isIE) {
var performance = window.performance;
if (
performance &&
typeof performance.now === 'function' &&
getNow() > document.createEvent('Event').timeStamp
) {
// if the event timestamp, although evaluated AFTER the Date.now(), is
// smaller than it, it means the event is using a hi-res timestamp,
// and we need to use the hi-res version for event listener timestamps as
// well.
getNow = function () { return performance.now(); };
} else {
getNow = function () { return Date.now() - baseNow; };
}
}
The text was updated successfully, but these errors were encountered: