-
Notifications
You must be signed in to change notification settings - Fork 40
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
Update jQuery related libraries in core to their latest version, where possible #6185
Comments
Some findings so far: the latest jquery.form.js still isn't fully fixed, see their issue for that. A PR exists for a while, but the issue seems to have stalled a bit. It's tricky re jquery.once.js. The new version 2.2.3 breaks all sorts of stuff in core. The change we'd need in 1.2.6 to get rid of deprecated functions is minimal, but that means, we'd fork it (the 1.x version isn't big). |
Re jquery.ui.touch-punch.js the original repo seems more or less abandoned, but there seems to be a maintained fork. Didn't dig into details. It's a dependency of backdrop.ckeditor.admin via ui.draggable. We might eventually be able to get rid of it in core, but might be forced to keep it for contribs. Not sure, where it's in use outside backdrop.ckeditor.admin. I'm also not sure, how functional it is, as touch events in browsers might be a moving target. |
A PR to start with, which updates jquery.form.js to 4.3.0. In jquery.once.js we'd only need to switch from |
After testing the ancient version of jquery.ui.touch-punch.js we currently have, my conclusion is that it's not working anymore, neither with jQuery 1.12 (legacy), nor with 3.7 (latest). I verified with Layout admin UI (drag-and-drop sorting) and with CKEditor admin UI (buttons configuration). However, the forked version (https://github.com/RWAP/jquery-ui-touch-punch/) seems to work. This needs more testing with actual touch devices, though. |
@indigoxela - based on the comments above, I tested the touch punch by editing the text format to drag another button to the task bar on my mobile: Android 13 | Chrome 115.0.5790.166 It worked well. |
Tested same as @yorkshire-pudding above and it was successful. Safari on iOS 16.5.1(c) |
Code looks good. |
By @indigoxela, yorkshire-pudding, @tkcent, and @herbdool.
Thanks folks! I merged backdrop/backdrop#4485 into 1.x only. With all the other jQuery updates going into 1.26.0 I figured we can keep them all in one release. 1.26.0 is just around the corner anyway. |
Description of the bug
Some JavaScript libraries used in core could get updated. Sort of a follow-up to #3106 and #6149.
Note that jQuery core is up-to-date, and jQuery UI has its own (stalled) issue on #5705.
But there's more. Core also ships with...
Why bothering?
Especially jquery.form.js and jquery.once.js are used all over the place in core. And both libraries still use functions that are deprecated in jQuery 3.x.
Other libs seem abandoned, they didn't get updated for more than a decade and it's time to possibly consider alternatives. Goal here is to update what we can update.
Conclusion: what we can update
The text was updated successfully, but these errors were encountered: