用的是ConfirmBox   

当显示隐藏的时候 如果手动选中了内容 状态保留了 

var box = new ConfirmBox({
trigger: '',
title: '',
message: '',
confirmTpl: '',
cancelTpl: ''
}).after("show",function(){
document.selection && document.selection.empty && ( document.selection.empty(), 1)
|| window.getSelection && window.getSelection().removeAllRanges();
});

 

关键代码

document.selection && document.selection.empty && ( document.selection.empty(), 1)
            
|| window.getSelection && window.getSelection().removeAllRanges();

相关文章:

  • 2022-02-26
  • 2021-12-31
  • 2021-10-06
  • 2022-12-23
  • 2021-12-10
  • 2022-01-29
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案