-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Clock displays and hides immediately after updating Chrome version to 73 #6312
Comments
Any quick fix on this? |
How to fix this error? |
The same here!! :( This problem happens only in Chrome, Edge works fine. |
It´s a race condition https://bugs.chromium.org/p/chromium/issues/detail?id=941910 The workaround is a setTimeout on root focus. |
Exactly. Either throttle / debounce (see pickadate 3.6.1) or use the setTimeout workaround. |
@Marzon We use materialize.js and where to use setTimeout? |
I am also looking for workaround for time picker cause upgrading to new materialcss is time consuming. Please let us know workaround for time picker For datepicker |
Can please specify where to add setTimeout in the JS file. That would be really helpful |
See amsul/pickadate.js#1140 with the right workaround. The other proposed change breaks focus (a11y). |
@DanielRuf it's quite hard to find the places to change the logic based on github.com/amsul/pickadate.js/pull/1140/files these changes, on materialize.js file. |
Hi! On materialize.js, add a setTimeout (100 ms) in end of the
Move de $document.on('click.' . .... and the P.$root.eq(0).focus(); to the setTimeOut function. Leave document.on first and $root.focus() after document.on .. I´m waiting the race condition bug to be fixed.. before to propose a PR.. |
Hi,
Just wrap setTimeout( 200 ms) inside this whole function, works well. |
Now it works fine ClockPicker.prototype.show = function (e) { setTimeout(function () {
}, 200); ` |
@DavinderPRO This is what I mean, does this work for you?
|
To fix the date picker change the code from:
to:
|
+1 |
Closes: Dogfalo#6312 Adds timeouts to user interactions to workaround chrome 73 bug
+1 |
@markonose Are you sure that |
@ray007 You are indeed correct, but at least in my case the
would work more like the original code intended |
If anyone stumbles uppon this thread here's how to fix the problem for the select dropdown
|
1.0.0 does not have this problem so if you are able to upgrade, I would recommend that route. However if you can't, try one of the fixes in this thread. Potentially we may add a fix for this if chrome doesn't revert this behavior. |
@Dogfalo do you know what was the change introduced in Chrome that produces this behaviour? |
I think it has to do with the timing of events when clicking an input. Where before it was click -> focus, it seems to now be focus -> click. This is just a guess as I haven't looked deeply into the issue yet. |
Above fix was not showing the already selected item from drop-down hence i modified it little bit. below is changed code. $newSelect.on({
|
@Dogfalo Version 74 of Chrome is released and they didn't fix this, reading the comment 23 in https://bugs.chromium.org/p/chromium/issues/detail?id=941910#c6 it doesn't seem they are going to fix it, couldn't you please just fix it in materializecss? |
Well it will not fix old releases as 0.x is not actively developed anymore but 1.x. |
I thought this may help some who stumbled on this page. I am using angular2-materialize and my materialize select input sometimes closes immediately after opening. I solved this by adding a click listener on a |
For anyone who is too lazy to edit the file yourself |
@LemuelHui Awesome =) Is there also a minified patched version? If you need help with that, just let me know. |
PS: the timeout does not really fix that (longpress click). You can check how we have fixed it in pickadate.js. |
@DanielRuf could you provide a link to the commit with the fix that you did for pickadate? |
@Sebastriani see amsul/pickadate.js@31789eb My initial approach using timers (with setTimeout) did not work in all but many cases as it was added at the top of the counter stack of the VM. |
The quick fix in the original codepen example (https://codepen.io/anon/pen/evQxPy) in this issue would be a code snippet like this: |
Hi,
When we click on the filed the clock modal opens and immediately close
https://codepen.io/anon/pen/evQxPy
This happens after I have updated my chrome version to 73
The text was updated successfully, but these errors were encountered: