This repository has been archived by the owner on May 24, 2024. It is now read-only.
Support for opening external links from the ApplicationNavigation Utility menu #298
Labels
Milestone
Feature Request
Description
Our team wanted to create an
ApplicationNavigation
utility item which opens a URL in a new tab/window, for the purpose of linking to an external help page, e.g. when selecting the specified item below:Attempting to invoke
window.open()
in either theonSelectHelp
oronSelectUtilityItem
callbacks results in popup-blocking behaviors in the latest versions of Firefox and Safari (as of June 2022), and a no-op in iOS 14.4. Notably however, Chrome seems to natively understand that the request originated as a result of a user click and allows for the window to open.I wasn't sure whether to classify this as a bug, as it's not clear to me whether this type of usage was ever intended. That said, either altering the code to allow for the above behavior to work across all major browsers or adding first-class support for this feature would be desirable.
As an example of the latter proposal, the
utilityItems
object could potentially expose a configuration option that would support this feature (similar to theexternal
variant in the Hyperlink component), such that upon selecting the item, theexternalLink
URL would open in a new window, without the need to define a callback method:Additional Context / Screenshots
Note: Prior to creating this issue, I searched the repo history and found a similar request. However, I believe that request was specific to the
navigationItems
as opposed to theutilityItems
. Additionally, we don't have a desire/need for the utility items to behave like standard browser hyperlinks (ie. such that a user may right-click and select 'open in a new tab').The text was updated successfully, but these errors were encountered: