Skip to content

Commit 45d9a02

Browse files
committed
fix(tooltip): create arrow as span
1 parent 3f2dfc3 commit 45d9a02

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

projects/igniteui-angular/src/lib/directives/tooltip/tooltip.common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export class TooltipPositionStrategy extends AutoPositionStrategy {
185185
return;
186186
}
187187

188-
const arrow = tooltip.querySelector('div[data-arrow="true"]') as HTMLElement;
188+
const arrow = tooltip.querySelector('[data-arrow="true"]') as HTMLElement;
189189

190190
// If display is none -> tooltipTarget's hasArrow is false
191191
if (!arrow || arrow.style.display === 'none') {

projects/igniteui-angular/src/lib/directives/tooltip/tooltip.directive.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { Placement, PositionsMap } from './tooltip.common';
1212
const HIDDEN_TOOLTIP_CLASS = 'igx-tooltip--hidden';
1313
const TOOLTIP_CLASS = 'igx-tooltip';
1414
const HIDE_DELAY = 180;
15-
const TOOLTIP_ARROW_SELECTOR = 'div[data-arrow="true"]';
15+
const TOOLTIP_ARROW_SELECTOR = '[data-arrow="true"]';
1616

1717
describe('IgxTooltip', () => {
1818
let fix: ComponentFixture<any>;

projects/igniteui-angular/src/lib/directives/tooltip/tooltip.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export class IgxTooltipDirective extends IgxToggleDirective implements OnDestroy
192192
}
193193

194194
private _createArrow(): void {
195-
this._arrowEl = document.createElement('div');
195+
this._arrowEl = document.createElement('span');
196196
this._arrowEl.style.position = 'absolute';
197197
this._arrowEl.setAttribute('data-arrow', 'true');
198198
this.element.appendChild(this._arrowEl);

0 commit comments

Comments
 (0)