On Click Event is not reliable in CEF (not triggered recognized every time)
Version
3.0.4
Reproduction link
https://jsfiddle.net/5zrqps3n/
Steps to reproduce
When using CEF in Game Engine, it seems that some clicks not get triggered every time. Hard to reproduce out of game.
But it is a simple @click on a Button like in the minimal reproduction.
What is expected?
Click Event should be fired every single time.
What is actually happening?
Sometimes you need 2-5 clicks before the events is triggered.
Similar problems: https://github.com/altmp/altv-issues/issues/430 https://github.com/vuejs/vue/issues/10366 https://github.com/vuejs/vue-next/issues/2862 https://github.com/vuejs/vue/pull/11031
Found something interesting here on CEF issue tracker: https://bitbucket.org/chromiumembedded/cef/issues/2749/osr-results-in-weird-eventtimestamp-values
The problem here is the good old event.timestamp which is not always working right in CEF browsers. https://github.com/vuejs/vue-next/blob/master/packages/runtime-dom/src/modules/events.ts
// line 113
const timeStamp = e.timeStamp || _getNow()
// changed to
const timeStamp = _getNow()
This solved the problem for me. But in the end the original code seems correct if e.timestamp would work correctly in CEF browsers.