Skip to content

Commit dfc736e

Browse files
EvilAlexeivalorkin
authored andcommitted
fix(tooltip): fix width property in chrome for custom element (#2559)
- fixed width calculation in chrome for bs-tooltip-container(added display: block) - changed test for 'auto' placement, changed 'left' class to 'right'
1 parent 8ac689a commit dfc736e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/spec/ng-bootstrap/tooltip.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ describe('tooltip', () => {
198198

199199
expect(windowEl).toHaveCssClass('tooltip');
200200
expect(windowEl).toHaveCssClass('tooltip-auto');
201-
expect(windowEl).toHaveCssClass('left');
201+
expect(windowEl).toHaveCssClass('right');
202202
expect(windowEl.textContent.trim()).toBe('Great tip!');
203203
});
204204
});

src/tooltip/tooltip-container.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ import { isBs3 } from '../utils/ng2-bootstrap-config';
1313
'[class.show]': '!isBs3',
1414
role: 'tooltip'
1515
},
16-
styles: [`
16+
styles: [`
17+
:host.tooltip {
18+
display: block;
19+
}
1720
:host.bs-tooltip-top .arrow, :host.bs-tooltip-bottom .arrow {
1821
left: calc(50% - 2.5px);
1922
}

0 commit comments

Comments
 (0)