STR: 1. Be sure you have traditional (non-overlay) scrollbars enabled. (On Windows and Linux, enable "Always show scrollbars" in Firefox preferences -- enabled by default on Windows, I think. On macOS, use the System Preferences app and search "scroll bar behavior" and choose "Show scroll bars: always") 2. View https://bugzilla.mozilla.org/attachment.cgi?id=9330847 ACTUAL RESULTS: The first textarea as being ~2 lines tall. (Technically it's tall enough for 1 line of text and a horizontal scrollbar, which is about the same height.) EXPECTED RESULTS: It should perhaps be ~1 line tall. Reasoning: (A) Other browsers render it as 1 line tall. (B) Google.com happens to have a cosmetic dependency on it rendering as 1 line tall; see bug 1829588. (C) The extra height here is due to us reserving some space for the horizontal scrollbar. However, by default, I think textareas shouldn't be able to overflow horizontally, since we give them this styling: https://searchfox.org/mozilla-central/rev/1777bccfa2559e8c1331fa1541150c985328778b/layout/style/res/forms.css#105,119-120 ``` textarea { ... white-space: pre-wrap; word-wrap: break-word; ``` ...and I think that makes it impossible to overflow horizontally, essentially? So maybe it'd make sense to suppress this space if we have these default styles, and only leave space for the scrollbar if we have non-default values of these properties that could conceivably cause us to need the horizontal scrollbar? That seems to be what Chrome is doing, when you compare the first and second textareas in the linked testcase. (It's entirely possible there's an some edge case that makes this trickier than I'm describing it.)
Bug 1830576 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
STR: 1. Be sure you have traditional (non-overlay) scrollbars enabled. (On Windows and Linux, enable "Always show scrollbars" in Firefox preferences -- enabled by default on Windows, I think. On macOS, use the System Preferences app and search "scroll bar behavior" and choose "Show scroll bars: always") 2. View https://bugzilla.mozilla.org/attachment.cgi?id=9330847 ACTUAL RESULTS: The first textarea as being ~2 lines tall. (Technically it's tall enough for 1 line of text and a horizontal scrollbar, which is about the same height.) EXPECTED RESULTS: It should perhaps be ~1 line tall. Reasoning: (A) Other browsers render it as 1 line tall. (B) Google.com happens to have a cosmetic dependency on it rendering as 1 line tall; see bug 1829588. (C) The extra height here is due to us reserving some space for the horizontal scrollbar. However, by default, I think textareas shouldn't be able to overflow horizontally, since we give them this styling: https://searchfox.org/mozilla-central/rev/1777bccfa2559e8c1331fa1541150c985328778b/layout/style/res/forms.css#105,119-120 ``` textarea { ... white-space: pre-wrap; word-wrap: break-word; ``` ~...and I think that makes it impossible to overflow horizontally, essentially? So maybe it'd make sense to suppress this space if we have these default styles, and only leave space for the scrollbar if we have non-default values of these properties that could conceivably cause us to need the horizontal scrollbar? That seems to be what Chrome is doing, when you compare the first and second textareas in the linked testcase. (It's entirely possible there's an some edge case that makes this trickier than I'm describing it.)~ [EDIT: yeah, it's not that simple; it's still possible to overflow horizontally; I'll post some examples in following comments]