-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Support jQuery 3.5+ #4034
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
Support jQuery 3.5+ #4034
Conversation
|
I've been using Summernote with the updated patch to jQuery 3.5, 3.5.1 I think it was, and with the latest jQuery 3.6, without any issues, so I'm wondering if this change is required. |
|
@DiemenDesign I checked with a build from the latest develop branch and jQuery 3.6.0 and this issue was present for me on the latest Chrome for macOS. I also checked with the latest tagged release and jQuery 3.5.1 and also had the issue. I think it may only happen in Chrome under certain situations, but closing the <textarea> tags immediately fixed it for me. |
|
The only difference for me, from the looks of it, is I'm using Chrome in Linux. I wonder if the Chrome build in Mac is a little different? I wouldn't have thought it would be. Anyway, I just wanted to check with you, as I'll also have to add these changes to the Skunkworks repository, and if it was a non-issue considering the upgrade of jQuery, if it was worth my time to do so. |
|
If it is a lot of trouble to merge all of these changes, I think only updating the lines related to <textarea> will fix the linked issue. I just did the rest to be thorough. |
|
I was just looking through some of the Skunkworks source, some of which has had the updates similar to what you've made in this PR. I realise you've tested the |
|
No I have not checked, other than a quick test where summernote seemed to be behaving normally. It is my understanding that changing the syntax gets you the same result in jQuery (a single node, closed properly), at least before they made this breaking change. |
|
Yeah, wasn't a good move on their part. The only reason I can think why they would do that, was to make the framework a smaller footprint. We are hoping to remove the dependency of jQuery in the future, then these things won't be an issue. |
|
I've just been reading some disturbing info about Apple gate keeping software, and in particular the Apple version of Chrome. I'd like to find out for sure, but the post I was reading on Reddit, a few people have mentioned that Chrome on Apple is just Safari with a wrapper to make it look like Chrome. If this is the case, it may explain a lot of inconsistencies between the same software on different OS's. https://www.reddit.com/r/webdev/comments/o5k8gb/rant_i_cant_stand_developing_for_safari_anymore/ |
As we are using a customized version for the Bootstrap 5 compatibility anyways, with this we are also including the changes proposed in summernote/summernote#4034 to fix #2816.
|
Thanks a lot! |
What does this PR do?
jQuery 3.5 introduced a breaking change, which basically means that jQuery previously would expand a self-closing tag into opening and closing tags, but now it does not. For example:
Normally this does not cause issues, but Chrome is particularly sensitive to an unclosed
<textarea>tag. This caused the issue in #3820This PR replaces the self-closing syntax with explicitly-closed syntax for any non-void HTML elements. It also fixes #3820 once and for all.
Where should the reviewer start?
Make sure I covered all self-closing situations in the codebase.
How should this be manually tested?
Run existing summernote version with jQuery >= 3.5
Try to submit a form with a summernote field in Chrome
Observe error in Chrome console:
Form submission failed, as the <TEXTAREA> element named '' was implicitly closed by reaching the end of the file. Please add an explicit end tag ('</TEXTAREA>')Build this PR and run same procedure above
Observe that form submits successfully
Any background context you want to provide?
What are the relevant tickets?
Checklist