I have a collection of commands that are displayed in a console-like format using Angular. When a new command is added, it appears at the bottom and the overflow moves upwards to accommodate the new content. However, I am facing an issue where I can no longer scroll to view previous commands.
Here is the current code snippet:
<div style="border: 2px solid #000000; height: 200px; width: 300px; position: relative; overflow-x: auto;">
<div style="position: absolute; bottom: 0;">
<p>oldest</p>
<p>Test</p>
<p>Test</p>
<p>Test</p>
<p>Test</p>
<p>Test</p>
<p>Test</p>
<p>Test</p>
<p>Test</p>
<p>Test</p>
<p>Test</p>
<p>latest</p>
</div>
</div>
The current setup achieves the desired functionality, but it prevents me from scrolling to view older commands. I am aware of how to make the scroll bar reappear, but doing so disrupts the overflow to the top.
Do you have any suggestions on how I can address this issue?