Repository navigation
Fix Bug 1611512 - Add ability for Add Comment input to grow as you type - #1546
Conversation
|
Additional issue discovered is that when the user uses the |
|
Hi @abowler2, could you please resolve the conflict? |
|
Third time's the charm....right 😉 |
mathjazz
left a comment
There was a problem hiding this comment.
Good job! Left a few notes, nothing major.
I can't reproduce the issue with the "downward growth" scenario, though.
|
With the current changes the issue I was having with the downward growth is no longer present. However, it is allowing for an empty input to be submitted into the database even though there is a check for empty within the |
Did you have thoughts on this?? |
We should use OTOH, we should use Please also revert the changes in Translation.js and views.py when the PR is complete, so that the comments functionality remains disabled. |
This fix allows for the textarea in Add Comment to grow as the user types.
I have actually set up a way to grow the textarea either in a downward direction or an upward direction (similar to Slack). However, both options pose additional challenges that I have not yet found solutions for.
Downward growth (which is what is active): If there are multiple comments and the Add Comment textarea grows to the point that the outer
historydiv begins scrolling then every keypress causes thehistoryscroll to jump back up which is not a good experience.Upward growth (can be activated by uncommenting the CSS in
AddComent.css): This has a fluid growth action, but it does not effect thehistorydiv which means the overflow is never switched to scroll and the textarea grows up and covers the comment above it.I have tried implementing lifecycle methods/hooks using a
refon the Historyuland/or on the existingrefon the textarea to set or remember the scroll position but have not had success. The closest I came was with the downward growth and calling a function withonScrollthat scrolled to the bottom, but this option disabled the ability to scroll back up.Let me know which option is preferable (upward or downward growth) and your thoughts on how I can address the associated scrolling issue for that option. ~ Thanks