Try to handle paste focus a bit better

This commit is contained in:
Andre D 2015-06-05 23:53:00 -04:00
parent 4b65753f11
commit 18ce5d3554

View file

@ -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')) {