Skip to content

Commit

Permalink
fix(tooltip): fix width property in chrome for custom element (#2559)
Browse files Browse the repository at this point in the history
- fixed width calculation in chrome for bs-tooltip-container(added display: block)
- changed test for 'auto' placement, changed 'left' class to 'right'
  • Loading branch information
EvilAlexei authored and valorkin committed Sep 1, 2017
1 parent 8ac689a commit dfc736e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/spec/ng-bootstrap/tooltip.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ describe('tooltip', () => {

expect(windowEl).toHaveCssClass('tooltip');
expect(windowEl).toHaveCssClass('tooltip-auto');
expect(windowEl).toHaveCssClass('left');
expect(windowEl).toHaveCssClass('right');
expect(windowEl.textContent.trim()).toBe('Great tip!');
});
});
Expand Down
5 changes: 4 additions & 1 deletion src/tooltip/tooltip-container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import { isBs3 } from '../utils/ng2-bootstrap-config';
'[class.show]': '!isBs3',
role: 'tooltip'
},
styles: [`
styles: [`
:host.tooltip {
display: block;
}
:host.bs-tooltip-top .arrow, :host.bs-tooltip-bottom .arrow {
left: calc(50% - 2.5px);
}
Expand Down

0 comments on commit dfc736e

Please sign in to comment.