Closed michaelthornberry closed 4 months ago
Line 1027, there is a check as such:
if ($target.prop("tagName") === "IMG" && $target.parents("#" + editorID)) {
Since $target.parents("#" + editorID) returns a valid jQuery result, the following code is executed even though the .length of that query may be 0.
$target.parents("#" + editorID)
The conditional should check the length of the result:
if ($target.prop("tagName") === "IMG" && $target.parents("#" + editorID).length) {
Version: 1.1.0 Browser and version: Chrome 126.0.6478.114
Hi @michaelthornberry
thank you for your report! The issue has been fixed with ed1c663
thank you for your report! The issue has been fixed with [ed1c663]
Thanks!
Describe the problem
Line 1027, there is a check as such:
if ($target.prop("tagName") === "IMG" && $target.parents("#" + editorID)) {
Since
$target.parents("#" + editorID)
returns a valid jQuery result, the following code is executed even though the .length of that query may be 0.What did you expect?
The conditional should check the length of the result:
if ($target.prop("tagName") === "IMG" && $target.parents("#" + editorID).length) {
What version and browser are you using?
Version: 1.1.0 Browser and version: Chrome 126.0.6478.114
Bug report checklist