mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user