mirror of https://github.com/layui/layui
fix(layer): 修复 layer.alert 在一些浏览器的兼容模式下报错无法弹出的问题; (#1940)
Co-authored-by: meihangbo <meihangbo@126.com>pull/1950/head
parent
7c82e15e85
commit
c15d4e6bbc
|
@ -440,7 +440,7 @@ Class.pt.creat = function(){
|
|||
}
|
||||
|
||||
// 是否移除活动元素的焦点
|
||||
if(config.removeFocus) {
|
||||
if(config.removeFocus && document.activeElement) {
|
||||
document.activeElement.blur(); // 将原始的聚焦节点失焦
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue