Revert "better fix for not scrolling textarea"
Focusing an offscreen textarea might be bad for usability.
This commit is contained in:
@@ -226,7 +226,9 @@
|
||||
Danbooru.RelatedTag.process_artist(Danbooru.RelatedTag.recent_artist);
|
||||
}
|
||||
|
||||
$field.focusWithoutScroll();
|
||||
if ($(window).scrollTop() <= $field.offset().top) {
|
||||
$field.focus();
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user