Merge pull request #22789 from atom/use-custom-element-on-text-editor-element-spec

Use custom elements on text editor element spec
This commit is contained in:
Sadick
2021-07-29 20:37:40 +03:00
committed by GitHub

View File

@@ -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();