You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While reviewing PR #29664 ; I encountered this but it also applicable in Gutenberg.
Description
This is a bit of an edge case, but when a user first enters a valid 'rel' value in the "link rel" field (which is ambiguously named, visit this issue for more information on the ambiguity; and then toggles, the value of the is overwritten.
Step-by-step reproduction instructions
Please list the steps needed to reproduce the bug. For example:
create new page
create a button
enter a link
go to the advanced settings or the link settings of that block's sidebar, enter in a valid 'rel' value. I typed in external in my test cases.
go back to the button, enable the toggle for the "open in new tab"
click publish
Expected behaviour
rel value to the button's link to be noreferrer noopener external
Actual behaviour
the rel's value of the button's link was 'rel="external noopener"
Screenshots or screen recording
The screen recording shows the intended behavior if you
2021-03-08.mp4
I've verified that this behavior occurs both when the user clicks the 'open in new tab' toggle in the sidebar or if they click the toggle in the link UI.
The more important part is that the rel field in the sidebar has values entered in it BEFORE the toggle is clicked.
I am NOT able to reproduce this if you first click the 'open in new tab' toggle and then add an additional rel value into the 'link rel' field (likely because 'external and noopener' are added first).
Also worth noting:
there is a PR to remove the noreferrer value - #26968
so this issue may be moot; I haven't tried if you enter multiple ref value first.
There's an issue to overhaul the entire link UI
WordPress information
WordPress version: 5.6.0
Gutenberg version: 10.1.1
Are all plugins except Gutenberg deactivated? yes
Are you using a default theme (e.g. Twenty Twenty-One)? tested on twentytwenty and twentytwentyone.
While reviewing PR #29664 ; I encountered this but it also applicable in Gutenberg.
Description
This is a bit of an edge case, but when a user first enters a valid 'rel' value in the "link rel" field (which is ambiguously named, visit this issue for more information on the ambiguity; and then toggles, the value of the is overwritten.
Step-by-step reproduction instructions
Please list the steps needed to reproduce the bug. For example:
externalin my test cases.Expected behaviour
rel value to the button's link to be
noreferrer noopener externalActual behaviour
the rel's value of the button's link was 'rel="external noopener"
Screenshots or screen recording
The screen recording shows the intended behavior if you
2021-03-08.mp4
I've verified that this behavior occurs both when the user clicks the 'open in new tab' toggle in the sidebar or if they click the toggle in the link UI.
The more important part is that the rel field in the sidebar has values entered in it BEFORE the toggle is clicked.
I am NOT able to reproduce this if you first click the 'open in new tab' toggle and then add an additional rel value into the 'link rel' field (likely because 'external and noopener' are added first).
Also worth noting:
there is a PR to remove the
noreferrervalue - #26968so this issue may be moot; I haven't tried if you enter multiple ref value first.
There's an issue to overhaul the entire link UI
WordPress information
Device information