Repository navigation
Expand text areas without limits - #1871
Conversation
GH sometimes restores content to textareas without triggering an `input` event, the result is that `fit-textarea` won't actually resize the textarea, so it's best to just leave it on `focusin`
| features.add({ | ||
| id: 'fit-textareas', | ||
| init | ||
| }); |
There was a problem hiding this comment.
Also test on dynamic content boxes in reviews
|
From Travis: |
|
That was a broken merge on master that's now fixed |
|
If I press Enter about ~40 consecutive times in the comment box here and then press Backspace, the page freezes. |
| - [The PR/issues search box is wider.](https://user-images.githubusercontent.com/1402241/55069759-bceaf080-50bf-11e9-84d0-7707de2eb9e9.png) | ||
| - [A warning appears when trying to create a PR from the default branch.](https://user-images.githubusercontent.com/1402241/52543516-3ca94e00-2de5-11e9-9f80-ff8f9fe8bdc4.png) | ||
| - [A warning appears when unchecking `Allow edits from maintainers`.](https://user-images.githubusercontent.com/1402241/53151888-24101380-35ef-11e9-8d30-d6315ad97325.gif) | ||
| - [Comment boxes no longer show scroll bars (they always fit their content)`.](https://user-images.githubusercontent.com/1402241/54336211-66fd5e00-4666-11e9-9c5e-111fccab004d.gif) |
There was a problem hiding this comment.
This is not entirely true, in for example, the "Review changes" comment box, I get a scrollbar after a while, but I guess we can ignore that case for a simplified description. Just wanted to mention it.
There was a problem hiding this comment.
If that happens, I missed it. I'll look into this and the possible freeze
There was a problem hiding this comment.
We can't touch that at all. The textarea was overflowing the viewport and it's in the position:fixed header, so we can't scroll along it. I excluded it to avoid any issues with it (I caused a few bugs on that very box many times already)
|
I really like this feature. Makes much more sense than scrollbars. |
Nasty bug, but it happens without RGH. cc @lukehefson Code gets stuck here in github-bootstrap.js |
Hmm, I can't recreate myself. Would y'all mind dropping a note to [email protected]. They are way better at working through and debugging stuff than I am! |
It's the regex. Notice how it increases with the |
|
I reported it to support@ |
Co-Authored-By: bfred-it <[email protected]>
because it's in a `position:fixed` container; The scroll has to appear within the fixed element.

Fixes #1862 with bfred-it/fit-textarea
Test
Some of these already natively expand, but they are limited to your viewport height. This PR should never show scrollbars in comment boxes.