开发者

How do I keep a textarea scrolled to the top in Firefox 4, like in previous Firefox versions?

开发者 https://www.devze.com 2023-03-02 12:49 出处:网络
Firefox 4 automatically scrolls a textarea to its bottom if the content exceeds the viewable size.Previous versions of Firefox didn\'t do that.

Firefox 4 automatically scrolls a textarea to its bottom if the content exceeds the viewable size. Previous versions of Firefox didn't do that.

Is there something, perhaps an about:config option, that I can tweak开发者_运维问答 to make it behave like it used to?


Ah, yes. With the focus() call you would get that behavior. See http://bugzilla.mozilla.org/show_bug.cgi?id=353539 for the reason Firefox 4 does that. It looks like webkit puts the caret at the beginning of the text on focus, not at the end. Opera has the same (buggy) behavior Firefox used to have: the caret goes at the end, but is not scrolled into view

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号