Button block - option to 'Open in new window'
Please can we have the option to 'open in a new window' on the button block? Either in the inspector controls or done in the same way as links (image below).

This was mentioned in #1404 with the button label but it seems the part about setting the target was missed.
Adding a screenshot showing the current state of the button block floating toolbar:
Seen at http://alittletestblog.com/wp-admin/post.php?post=14000&action=edit running WordPress 4.9.7 and Gutenberg 3.2.0 using Firefox 61.0.1 on macOS 10.13.5.
Worth noting this has been mentioned also in https://github.com/WordPress/gutenberg/issues/3350#issuecomment-410531124 with some more details. The point is while other blocks (Paragraph, Image, etc.) use a standardised URLInput component, instead the Button component uses a custom implementation of the URL input field and it misses the option "open in a new window". Also, the design is different:
@afercia Great point. It may be better to change the Button component to use the standardized URLInput component. However, I'm not sure if it was implemented this way on purpose.
@chrisvanpatten @aduth @youknowriad (sorry, not sure who's more appropriate to be involved on this issue) Maybe we don't need to use RichText in the Button component at all? It's not a general use-case to have parts of a button bold or italic. Either the entire button is bold or italic or not.
Submitted #10128 which addresses this enhancement.
Will this feature be implemented at the core? if so, when?
There's another PR #12738 addressing this issue, would be great to see one of them merged soon.
@shoxton it looks like work on this has been picked up by @nfmohit-wpmudev at https://github.com/WordPress/gutenberg/pull/10128 and that there is also recent discussion on that pull request, however, there is no guarantee of a timeline for something like that to get added and generally it depends on how much time the core team and other committers and contributors have to work on pull requests as well as code reviews for each other. In this case, it looks like there's some recent movement which is great!
@mvpspl619 thank you so much for the note about 12738!
Would be amazing, buttons are an important part of a UI, and not being able to direct to an external link in a new tab (as well as nofollow, noopener etc...) is quite a limiting parameter.
It is essential to have (open in new tab) option just like other components for Buttons as well. +1 vote to have that option in next release. Thanks
+1 from a WordPress.com customer
Being able to choose to open a button link in a new window? Yes + 1 on that.
+1 to this as well. The buttons are great, just that it'll be much better if we could have an option to open it in a new tab.
Btw, am quite inexperienced with this so hope you guys don't mind me asking again if it was already asked above or in other threads. May I know what is the quick fix/alternative to make the block open in a new tab? Editing the html? Many thanks!
Another frustrated Gutenberg user that battles with buttons that do not offer a target setting.... Get it together
+1 to this as well. The buttons are great, just that it'll be much better if we could have an option to open it in a new tab.
Btw, am quite inexperienced with this so hope you guys don't mind me asking again if it was already asked above or in other threads. May I know what is the quick fix/alternative to make the block open in a new tab? Editing the html? Many thanks!
@mattpan32 you can try adding the target="_blank" attribute to the button element, or just use the link block that has the "open in new tab" functionality.
+1 to this as well. The buttons are great, just that it'll be much better if we could have an option to open it in a new tab. Btw, am quite inexperienced with this so hope you guys don't mind me asking again if it was already asked above or in other threads. May I know what is the quick fix/alternative to make the block open in a new tab? Editing the html? Many thanks!
@mattpan32 you can try adding the
target="_blank"attribute to the button element, or just use the link block that has the "open in new tab" functionality.
Isnt Gutenberg supposed to "streamline the editing".
@mattpan32 you can try adding the
target="_blank"attribute to the button element, or just use the link block that has the "open in new tab" functionality. Adding it to the button block results in an "unexpected or invalid content" error and you have to convert to html. The only way that seems to work right now is just creating a link in a paragraph, editing the html for that block, and addingclass="wp-block-button__link"to the link there.
+1 from a WordPress.com user in #12136336-hc (noting for myself as they asked me to notify them if this ever does end up being implemented)
+1
+1 also but, until this is added, here is how to achieve this:
Here is a button as normal, without the '_blank' new page option:
Under the button options, select 'Edit as HTML':
Now edit the HTML to add the code target="_blank" as shown, and save:
Clicking the button will now open in new page.