Improve screenshot component teardown
This commit is contained in:
parent
efc1e85612
commit
513aefdb2c
File diff suppressed because one or more lines are too long
|
|
@ -60,10 +60,8 @@ KB.component('screenshot', function (containerElement) {
|
|||
}
|
||||
|
||||
function destroy() {
|
||||
if (pasteCatcher !== null) {
|
||||
document.body.removeChild(pasteCatcher);
|
||||
} else if (document.getElementById('screenshot-pastezone')) {
|
||||
document.body.removeChild(document.getElementById('screenshot-pastezone'));
|
||||
if (KB.exists('#screenshot-pastezone')) {
|
||||
KB.find('#screenshot-pastezone').remove();
|
||||
}
|
||||
|
||||
document.removeEventListener('click', setFocus);
|
||||
|
|
|
|||
Loading…
Reference in New Issue