Revert "better fix for not scrolling textarea"

Focusing an offscreen textarea might be bad for usability.
This commit is contained in:
Toks
2013-05-16 09:10:17 -04:00
parent 5727cd11ef
commit e1a047fd48
2 changed files with 3 additions and 8 deletions

View File

@@ -226,7 +226,9 @@
Danbooru.RelatedTag.process_artist(Danbooru.RelatedTag.recent_artist);
}
$field.focusWithoutScroll();
if ($(window).scrollTop() <= $field.offset().top) {
$field.focus();
}
e.preventDefault();
}

View File

@@ -103,11 +103,4 @@
this.selectRange(this.val().length, this.val().length);
return this;
}
$.fn.focusWithoutScroll = function(){
var x = window.scrollX;
var y = window.scrollY;
this.focus();
window.scrollTo(x, y);
};
})();