提交 d8feb77a 编写于 作者: I isidor

list: do not steal focus for hidden elements (properly get style)

上级 56ba2993
......@@ -351,8 +351,9 @@ class DOMFocusController<T> implements IDisposable {
const focusedDomElement = this.view.domElement(focus[0]);
const tabIndexElement = focusedDomElement.querySelector('[tabIndex]');
const style = tabIndexElement && window.getComputedStyle(tabIndexElement);
if (!tabIndexElement || !(tabIndexElement instanceof HTMLElement) || tabIndexElement.style.visibility === 'hidden' || tabIndexElement.style.display === 'none') {
if (!tabIndexElement || !(tabIndexElement instanceof HTMLElement) || style.visibility === 'hidden' || style.display === 'none') {
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册