mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +08:00
Don't close notifications dropdown if opening in a new tab
This commit is contained in:
parent
516569e2e9
commit
fd3600ad65
|
@ -27,7 +27,7 @@ export default class NotificationsDropdown extends Component {
|
|||
<span className="Button-icon">{unread || icon('bell')}</span>
|
||||
<span className="Button-label">{app.trans('core.notifications')}</span>
|
||||
</a>
|
||||
<div className="Dropdown-menu Dropdown-menu--right">
|
||||
<div className="Dropdown-menu Dropdown-menu--right" onclick={this.menuClick.bind(this)}>
|
||||
{this.showing ? NotificationList.component() : ''}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -41,4 +41,10 @@ export default class NotificationsDropdown extends Component {
|
|||
this.showing = true;
|
||||
}
|
||||
}
|
||||
|
||||
menuClick(e) {
|
||||
// Don't close the notifications dropdown if the user is opening a link in a
|
||||
// new tab or window.
|
||||
if (e.shiftKey || e.metaKey || e.ctrlKey || e.which === 2) e.stopPropagation();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user