Have to toggle Open In New Tab to disable it
I converted page content to blocks. All of my links opened in a new tab and I wanted to remove that function.
Upon clicking the link in the editor, the slide switch is set to off for opening in a new tab. But this is not representative of the truth. I have to toggle the slide switch on and then off and then update for it to work.
This is also inconsistent because some links on other pages that have been converted show the slide switch as on, indicating that the link will indeed open in a new window.
I think there's probably something in the link markup making Gutenberg think that they don't open in a new tab. (Maybe a different target value). Can you share the HTML of those links?
I tried testing this using 5.0.3-RC1-44445 and WordPress Beta Tester as the only active plugin with the following steps and found that the links were correctly toggled in my test.
- Install the Classic Editor 1.3 plugin.
- Create a new post with several links.
- Make sure each link is set to open in a new window using the link modal inside the classic editor.
- Uninstall the Classic Editor 1.3 plugin.
- Re-open the post using Gutenberg.
- Click on a link, click on the pencil icon to edit the link, click on the gear in the link modal.
- Check to see whether the "Open link in a new tab" option is checked.
Result: all "Open link in a new tab" option were checked as expected.
I am closing this issue because I was unable to see the problem happen in testing. Please update to the latest version of WordPress (if you haven't already) and try the test again. Please let me know if any steps in my testing list above are different from your own testing or if there's something different you think I could try. If the problem is still happening, please share the HTML of those links and ask to re-open this issue.