-
Notifications
You must be signed in to change notification settings - Fork 4.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
Caret (arrow) followed by a text link breaks content #11815
Comments
Thanks for using Gutenberg and for reporting issues! I was unable to replicate this issue in testing using WordPress 4.9.8 and Gutenberg 4.3 with the Twenty Seventeen 1.7 theme active using Firefox 63.0.1 on macOS 10.13.6. (54s) May I ask for a list of active plugins you were using when you tested? Do you have any browser extensions or add-ons installed by chance? It may be a long shot but could you also note your theme in case it's a factor? For the published post from your second screenshot, would it be possible for you to view the page source for the part of the page after the word "install" and before the gallery? Is the HTML there but not showing for some reason or is it completely missing from the page? |
Thanks for looking into this! I'm using Google Chrome (Version 70.0.3538.77) on macOS10.14 I managed to reproduce the bug on two separate WP installs with different themes and plugins. I tried to reproduce the issue again and I think I figured out what's wrong! Try this:
Now the part after the link should disappear. At least for me, everything breaks only if I set the link to open in new tab. If I leave the link to open in the same tab, things work as they should. Hope this helps! |
Let me know if you still need that page source! |
Could you provide what you see on the Code Editor view? (Found in the top-right menu) |
@aduth Here's what I see
Maybe an issue with RichText. |
Somehow the aria-label is containing the whole sentence |
That seems quite alarming to me. How / why is the |
On its own, that markup should not be breaking any page layout: |
gutenberg/packages/format-library/src/link/inline.js Lines 52 to 59 in 563ef41
I assume this should only be containing the text within the link. Technically it's a separate issue from what's originally reported here, but the reason for alarm is that this is something which can invalidate content if "fixed". |
@aduth I don't think in invalidates content as it will used the saved markup unless you insert a link again. |
Here's what I get in the Code Editor view:
|
That's true. It's still incorrect (and forever incorrect unless updated), but I suspect not strictly breaking at least. |
I think this issue is less critical than I thought initially as |
This still seems like a serious enough bug to warrant a fix before the release of a 5.0 RC. This kind of funky behavior really should not be happening at all at this stage of development. Follow-up bugfix releases are not an excuse to release something with not just bugs (which is perfectly normal), but with known bugs... especially weird ones like this that actually affect the front-end output, possibly even without the user being aware, if they did not happen to check the front-end preview. |
I did some more debugging here and it turns out this is not a Gutenberg issue but a WordPress issue already existing in the classic editor as well. Just paste this valid piece of HTML in the classic editor HTML mode.
I suggest creating a trac ticket for this and close this issue here. |
Created https://core.trac.wordpress.org/ticket/45387 to track it |
Created a separate issue for this at #12325 |
Describe the bug
Found this issue while writing a WordPress tutorial. Please see the screenshots below!
To Reproduce
Steps to reproduce the behavior:
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: