-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Chrome version 73 causing problems #1138
Comments
Same here! |
Sounds like a regression in Chrome which would be a browser bug. We will check if we have to adjust something but if it is a bug in Chrome it should be reported in their issue tracker. |
@DanielRuf I agree that it definitely sounds like a regression in Chrome and not pickadate's "fault". With that being said, Chrome is the most popular browser and with evergreen updates my users are getting updated without their knowledge. Any chance this project would accept a donation for helping me resolve this issue today? I can send $1000 via BTC/Cash App/Venmo/whatever, but I really need a fix today! |
I'm just digging through the source code commenting out lines of code to see if I can get a change of behavior. So far, I'm finding this in
When I comment out |
I think it has something to do with Event.path (https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/h-JwMiPUnuU/discussion) being removed in Chrome 73? |
So it looks like |
@hydemalion for now, I'm commenting out
in It looks like the Shadow DOM API has changed in Chrome 73, which the picker is relying on to determine whether a user clicked on the picker to open it, or elsewhere on the page to close it. |
@leesalminen we were just coming to the conclusion that disabling the click outside to close for chrome was the best workaround for now, thanks so much for your help finding that! |
Were there deprecation warnings in 70+ stable? Also I guess you both use Canary so 73 is not shipped to normal users until April.
https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath#Browser_compatibility |
https://chromereleases.googleblog.com/2019/03/stable-channel-update-for-desktop_12.html
I can confirm that I am not running Canary/Dev channel. I've had several hundred users report this issue starting today. Looks like 73 is getting rolled out to all users now. To be honest, I don't remember seeing any deprecation notice in 70. Just posting my stream of thoughts as I debug this. I can confirm that commenting out |
@DanielRuf I didn't notice any depreciation messages either, but I also wasn't looking for them, we're using this plugin on a site that we don't touch/change very frequently. And I'm also not using Canary. |
Seems they shipped it too early and deprecated it too early. Well, I'll check if we can extend the code part to include the new method. It seems it was promoted to stable and rolled out after my work day. It would have been better if the Chrome team would have respected their plans (separate deprecation, release in April, ...). Now my local Chrome instance has also updated to M73. Seems 75 is now Canary and there it is worse. Please test https://codepen.io/DanielRuf/pen/EMoRKp |
Getting console error to the effect of "event.composedPath is not a function", and not just in chrome, in other browsers as well. |
@DanielRuf I haven't had a chance to look into this as I'm quite busy at work..but just an fyi, this is how we get the event's path in v5: pickadate.js/lib/renderers/dom/getValueFromMouseEvent.js Lines 37 to 56 in 47e8dab
|
@DanielRuf https://codepen.io/DanielRuf/pen/EMoRKp is working for me in v73 and v72. Would you like a hand testing on v75? |
@leesalminen ah I understand your frustration..regarding the donation, that is always appreciated but it's difficult to guarantee we can resolve it "today". I haven't fully set up our funding distribution model yet, but we do have a BTC account now where we accept donations should you feel inclined: (on the bottom right https://amsul.ca/pickadate.js/v5/). Whichever one of our contributors is able to get to it, for now, I'd manually distribute the bounty to them 🌟 |
@DanielRuf can confirm @hydemalion report of console error for event.composedPath is not a function. The datepicker still "works" though and doesn't close as soon as its opened. Looks like you could change
to
Basically just testing that |
Mh, does not seem to work with the solution that you recommend. Will investigate further. I still think |
@DanielRuf I'm just headed into a meeting for about an hour and then I'll be back. One thing maybe important to keep in mind is that I'm using |
@DanielRuf I mean, you could do
and it'll exec composedPath(). |
Correct check would be with |
For reference, check the console of this reduced test case (without pickadate.js) while clicking the input: https://jsfiddle.net/caseyjhol/gftba6vc/3/. |
As a hacky workaround, I tried passing through the event from the initial |
The cause is something else much deeper in the code. In the The other PR with the So far
That's what I wrote but still, Chrome will change this in the near future too. It is just a red herring currently and not the cause.
Not really a solution. I think there is some event propagation and bubbling issue. I will come up with a solution later today. |
Oh, definitely not a solution. Was mainly just posting it for anybody who needs a temporary workaround. |
Found the cause, we have a race condition. https://codepen.io/DanielRuf/pen/QoQLMv Please test and verify if this works for you. https://github.com/amsul/pickadate.js/commit/62a186094f60a4a8a7ac210cbab36f855b8c639e.patch If this is the solution and the event handling in Chrome 73+ the cause I will open a Chromium bugtracker entry to check with the Chromium team if this is a regression or if we have used an anti pattern. |
Did you try to increase the timeout and clear your browser cache? |
Yes it is not a cache problem (i have this on my js/css files -> |
Yes, this timeout value. |
With a value of 100 seems to be much better! |
Does it solve your problem? @amsul should we increase it? Keep in mind that we also have to change it in the tests then. |
Yes the problem is solved (in my case). I did the tests on Google Chrome v73.0.3683.75. |
Updates simple-admin-pages to 2.1.2, in order to address a regression in Chromium that caused issues with the pickadate.js library. amsul/pickadate.js#1138
@DanielRuf I also have found that 50 isn't a long enough timeout for me, in testing. |
#1142 should improve this. |
I tested the patch proposed by @caseyjhol (on version 3.5, for CSS reasons. I hope it doesn't change the logic below). It seems to me that it works better than the implemented solution... My understanding of the problem : Using a Mac Pro trackpad, a "click" triggers a parasit click event on Chrome 73, when the finger is released. This click event does not have the right target for reasons that escape me. It therefore triggers the click listener set in the "open" function, to close the picker.
Am I missing something? Thanks for your code and reactivity in any case |
See #1138 (comment) |
@caseyjhol not sure if your code + mine correctly resolves it. Currently it is a nasty regression in Chromium and we should not try to fix browser bugs especially if they are so complicated. |
I think it's good that you guys have worked on a patch because it's breaking for our users 👍 |
Our team had this issue. FWIW we are using the classic theme and it was only an issue when the datepicker opened directly above the |
This is still an ongoing issue in Chrome 85 and I see Anyways in case other developers find this here is a solution on how to solve this. var $input = $('.datepicker').pickadate({
selectMonths: true,
selectYears: true,
format: 'yyyy-mm-dd',
});
$input.on('mousedown', function cancelEvent(evt) {
evt.preventDefault();
}); |
@ConradSollitt it should be fixed in the latest release Materialize (I'm currently one of the maintainers of a fork and I worked on it too) bundles a custom and old version of pickadate. Still, Google has to fix their stuff. I guess the bugreport is still open. |
In Chrome 73 desktop we're seeing various odd behaviors in both the newest version of pickadate and the older version we were using.
One user reported the datepicker opens as soon as the page loads instead of waiting for him to click on the input. (unable to reproduce as of yet).
I myself am seeing the datepicker close and run the OnClose event immediately after clicking to open it.
On the examples on your demo site https://amsul.ca/pickadate.js/, I'm seeing what appears to be the datepicker opening twice; it flashes up, then flashes down, then flashes up again. In the console, for the events example that logs the events I see "opened up", "closed now", and then "opened up" again.
I don't see any of this behavior in Edge or Firefox. I also didn't see the problem in Chrome 72,
The text was updated successfully, but these errors were encountered: