Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compose-box: Fix compose-box from covering last messages of stream.
While writing a long message in compose-box, the last few messages of the current stream gets covered by the compose-box and it gets pretty annoying sometimes trying to figure out a way to read the last message of the stream while writing. Right now, the only way to get past this is to resize `compose-textarea` by using the resize tool at the bottom-right corner of the `compose-textarea`. But, that small resize tool is not always readily visible to the user. The proposed solution in this commit is to reset the `max-height` property of `compose-textarea` everytime `bottom_whitespace_height` is resized such that the total height of `compose-container` is always equal to the height of `bottom_whitespace_height`. Doing this, the compose-box never covers the last message of the current stream. The only problem with this is that if the compose-box is closed at the time of bottom-whitespace resize, we cannot find the `compose_non_textarea_height` and so, we cannot reset the max-height of `compose-textarea`. To solve this, max-height of `compose-textarea` is also reset everytime a new compose-box is opened. Tested on my Ubuntu Development Environment on Chrome and Firefox browsers. Fixes: zulip#16038.
- Loading branch information