用的是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();