Skip to content

Commit 8217970

Browse files
committed
refactor: remove no longer needed bringToFront workaround
1 parent 3efff9d commit 8217970

File tree

2 files changed

+1
-40
lines changed

2 files changed

+1
-40
lines changed

packages/combo-box/src/vaadin-combo-box-base-mixin.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,6 @@ export const ComboBoxBaseMixin = (superClass) =>
184184
this.clearElement.addEventListener('mousedown', this._boundOnClearButtonMouseDown);
185185
}
186186

187-
const bringToFrontListener = () => {
188-
requestAnimationFrame(() => {
189-
this._overlayElement.bringToFront();
190-
});
191-
};
192-
193-
this.addEventListener('mousedown', bringToFrontListener);
194-
this.addEventListener('touchstart', bringToFrontListener);
195-
196187
this.addController(new VirtualKeyboardController(this));
197188
}
198189

test/integration/dialog-combo-box.test.js

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
import { expect } from '@vaadin/chai-plugins';
22
import { sendKeys } from '@vaadin/test-runner-commands';
3-
import {
4-
fixtureSync,
5-
mousedown,
6-
nextFrame,
7-
nextUpdate,
8-
oneEvent,
9-
outsideClick,
10-
touchstart,
11-
} from '@vaadin/testing-helpers';
3+
import { fixtureSync, nextUpdate, oneEvent, outsideClick } from '@vaadin/testing-helpers';
124
import './not-animated-styles.js';
135
import '@vaadin/combo-box';
146
import '@vaadin/dialog';
@@ -78,26 +70,4 @@ describe('combo-box in dialog', () => {
7870
expect(dialog.opened).to.be.false;
7971
});
8072
});
81-
82-
describe('modeless', () => {
83-
beforeEach(async () => {
84-
dialog.modeless = true;
85-
comboBox.open();
86-
await nextFrame();
87-
});
88-
89-
it('should not end up behind the dialog overlay on mousedown', async () => {
90-
mousedown(comboBox);
91-
await nextFrame();
92-
expect(comboBox.$.overlay._last).to.be.true;
93-
});
94-
95-
it('should not end up behind the dialog overlay on touchstart', async () => {
96-
const { left: x, top: y } = comboBox.getBoundingClientRect();
97-
touchstart(comboBox, { x, y });
98-
99-
await nextFrame();
100-
expect(comboBox.$.overlay._last).to.be.true;
101-
});
102-
});
10373
});

0 commit comments

Comments
 (0)