Try to handle paste focus a bit better
This commit is contained in:
parent
4b65753f11
commit
18ce5d3554
1 changed files with 2 additions and 5 deletions
|
@ -93,20 +93,17 @@ $(function () {
|
|||
|
||||
g.focusPaste = function () {
|
||||
setTimeout(function () {
|
||||
pasteCatcher.focus();
|
||||
pasteCatcher.click()
|
||||
pasteCatcher.focus()
|
||||
}, 100);
|
||||
}
|
||||
|
||||
$(document).on('click', function (e) {
|
||||
if (e.target == document.body) {
|
||||
if (e.target == document.body && pastearea.is(':visible')) {
|
||||
e.preventDefault()
|
||||
g.focusPaste();
|
||||
}
|
||||
})
|
||||
|
||||
g.focusPaste();
|
||||
|
||||
|
||||
$(document).on('paste', function (e) {
|
||||
if (!pastearea.is(':visible')) {
|
||||
|
|
Loading…
Reference in a new issue