Skip to content

Commit

Permalink
fix(overlay): hover trigger stop fire show if container already exists (
Browse files Browse the repository at this point in the history
  • Loading branch information
tibing-old-email committed Nov 14, 2018
1 parent 57777f8 commit 2988a4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ describe('hover-trigger-strategy', () => {
});

it('should fire show$ when hover on host', done => {
const triggerStrategy = triggerStrategyBuilder.build();
const triggerStrategy = triggerStrategyBuilder
.container(() => null)
.build();
triggerStrategy.show$.subscribe(done);
mouseEnter(host);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export class NbHoverTriggerStrategy extends NbTriggerStrategy {

show$: Observable<Event> = observableFromEvent<Event>(this.host, 'mouseenter')
.pipe(
filter(() => !this.container()),
delay(100),
takeUntil(observableFromEvent(this.host, 'mouseleave')),
repeat(),
Expand Down

0 comments on commit 2988a4b

Please sign in to comment.