Skip to content

Commit

Permalink
fix(context menu): add cursor pointer to menu host (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
yggg committed Jul 9, 2019
1 parent a2e20a0 commit 337cacf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
@import '../../styles/core/mixins';

@mixin nb-context-menu-theme() {

.context-menu-host {
/*
Fixes click not being bubbled to the body in Safari.
https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
*/
cursor: pointer;
}

nb-context-menu {
background-color: nb-theme(context-menu-background-color);
border-color: nb-theme(context-menu-border-color);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
ComponentRef,
Directive,
ElementRef,
HostBinding,
Input,
OnChanges,
OnDestroy,
Expand Down Expand Up @@ -105,6 +106,9 @@ import { NbMenuItem, NbMenuService } from '../menu/menu.service';
})
export class NbContextMenuDirective implements NbDynamicOverlayController, OnChanges, AfterViewInit, OnDestroy, OnInit {

@HostBinding('class.context-menu-host')
contextMenuHost = true;

/**
* Position will be calculated relatively host element based on the position.
* Can be top, right, bottom and left.
Expand Down

0 comments on commit 337cacf

Please sign in to comment.