Skip to content
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

Uncaught TypeError: a.destroy is not a function when image upload failed in editor #262

Open
sdelcroix opened this issue Jan 22, 2024 · 0 comments

Comments

@sdelcroix
Copy link

sdelcroix commented Jan 22, 2024

Describe the bug
When a error occurs during image upload in text editor (for example by using an image with a width greater than 3840 pixels), there's an error message that appears under the text field then fade.
The HTML element of this message is then intended to be removed from DOM, but the jQuery method used on this element is "destroy()".
This method doesn't exist in jQuery thus a javascript error occurs : Uncaught TypeError: a.destroy is not a function

"destroy()" has to be replaced by "remove()" : https://api.jquery.com/remove/#remove-selector

Desktop (please complete the following information):

  • OS: macOS 12.7.2
  • Browser : Chrome
  • Version 120

Additional context
Here the browser Javascript trace :

Uncaught TypeError: a.destroy is not a function
    at HTMLParagraphElement.<anonymous> (editor.js:116:16)
    at r.complete (jquery.js:7736:12)
    at u (jquery.js:3500:31)
    at Object.fireWith [as resolveWith] (jquery.js:3630:7)
    at u (jquery.js:7579:13)
    at E.fx.tick (jquery.js:7903:19)
    at ut (jquery.js:7282:13)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant