fix(layer): 修复 layer.alert 在一些浏览器的兼容模式下报错无法弹出的问题; (#1940)

Co-authored-by: meihangbo <meihangbo@126.com>
pull/1950/head
meihangbo 2024-05-24 09:16:05 +08:00 committed by GitHub
parent 7c82e15e85
commit c15d4e6bbc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -440,7 +440,7 @@ Class.pt.creat = function(){
}
// 是否移除活动元素的焦点
if(config.removeFocus) {
if(config.removeFocus && document.activeElement) {
document.activeElement.blur(); // 将原始的聚焦节点失焦
}