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 () {
|
g.focusPaste = function () {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
pasteCatcher.focus();
|
pasteCatcher.focus()
|
||||||
pasteCatcher.click()
|
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('click', function (e) {
|
$(document).on('click', function (e) {
|
||||||
if (e.target == document.body) {
|
if (e.target == document.body && pastearea.is(':visible')) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
g.focusPaste();
|
g.focusPaste();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
g.focusPaste();
|
|
||||||
|
|
||||||
|
|
||||||
$(document).on('paste', function (e) {
|
$(document).on('paste', function (e) {
|
||||||
if (!pastearea.is(':visible')) {
|
if (!pastearea.is(':visible')) {
|
||||||
|
|
Loading…
Reference in a new issue