diff --git a/lib/components/app/app-menu-item.tsx b/lib/components/app/app-menu-item.tsx index f3a8e533b..3a9baebc7 100644 --- a/lib/components/app/app-menu-item.tsx +++ b/lib/components/app/app-menu-item.tsx @@ -68,7 +68,9 @@ export default class AppMenuItem extends Component { render(): JSX.Element { const { icon, id, onClick, subItems, text, ...otherProps } = this.props const { isExpanded } = this.state - const Element = otherProps.href ? 'a' : 'button' + const hasHref = !!otherProps.href + const isAbsolute = otherProps.href?.startsWith('http') + const Element = hasHref ? 'a' : 'button' const containerId = `${id}-container` return ( <> @@ -80,6 +82,7 @@ export default class AppMenuItem extends Component { onClick={subItems ? this._toggleSubmenu : onClick} onKeyDown={this._handleKeyDown} {...otherProps} + target={hasHref && isAbsolute ? '_blank' : undefined} > {icon} {text}