(event)
| 4146 | this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1)); |
| 4147 | } |
| 4148 | _keydown(event) { |
| 4149 | if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY, HOME_KEY, END_KEY].includes(event.key)) { |
| 4150 | return; |
| 4151 | } |
| 4152 | event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page |
| 4153 | event.preventDefault(); |
| 4154 | const children = this._getChildren().filter(element => !isDisabled(element)); |
| 4155 | let nextActiveElement; |
| 4156 | if ([HOME_KEY, END_KEY].includes(event.key)) { |
| 4157 | nextActiveElement = children[event.key === HOME_KEY ? 0 : children.length - 1]; |
| 4158 | } else { |
| 4159 | const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key); |
| 4160 | nextActiveElement = getNextActiveElement(children, event.target, isNext, true); |
| 4161 | } |
| 4162 | if (nextActiveElement) { |
| 4163 | nextActiveElement.focus({ |
| 4164 | preventScroll: true |
| 4165 | }); |
| 4166 | Tab.getOrCreateInstance(nextActiveElement).show(); |
| 4167 | } |
| 4168 | } |
| 4169 | _getChildren() { |
| 4170 | // collection of inner elements |
| 4171 | return SelectorEngine.find(SELECTOR_INNER_ELEM, this._parent); |
no test coverage detected