Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions spec/text-editor-element-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,16 @@ describe('TextEditorElement', () => {
});

describe('when focused while a parent node is being attached to the DOM', () => {
class ElementThatFocusesChild extends HTMLDivElement {
attachedCallback() {
class ElementThatFocusesChild extends HTMLElement {
connectedCallback() {
this.firstChild.focus();
}
}

document.registerElement('element-that-focuses-child', {
prototype: ElementThatFocusesChild.prototype
});
window.customElements.define(
'element-that-focuses-child',
ElementThatFocusesChild
);

it('proxies the focus event to the hidden input', () => {
const element = buildTextEditorElement();
Expand Down