-
Notifications
You must be signed in to change notification settings - Fork 2k
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
JS error when clicking Crop button on Image block #90791
Comments
📌 REPRODUCTION RESULTS 📌 ACTIONS 📌 Message to Author
I am going to close this as "cannot repro" but please feel free to reopen if you can still reproduce this. |
Hi @mrfoxtalbot 👋 I can consistently reproduce the issue on one of my sites, jardasn.blog. What's special about it is that it uses the Calypso Posts view, and uses the Calypsoified iframed Gutenberg -- the URL is not Sometimes I need to click crop, leave the crop mode by clicking outside the image, and the click crop again to trigger the issue. Here is a screen recording showing how I can trigger it two times in a row: Screen.Recording.2024-05-17.at.14.35.10.mov |
Thank you @jsnajdr! Do you want to reopen the issue and update the title to add the details you just shared? |
Yes, let's reopen it, especially if the fix is known and easy. I think the title is good, do you think there is some important detail that should be added there? |
Steps to reproduce
What happens is that Crop doesn't work, and I see this error in console:
It happens in this
traverseToFindLink
loop:wp-calypso/apps/wpcom-block-editor/src/calypso/features/iframe-bridge-server.js
Line 1031 in 652a787
One notable thing about this loop is that it traverses up the element hierarchy:
element = element.parentElement
, but doesn't check if theelement
becomesnull
. The element that I clicked on is an SVGpath
, and I think the.parentElement
becomesnull
because the clicked element is immediately removed from DOM (the button is removed from the toolbar) and then it has no parent.The text was updated successfully, but these errors were encountered: