jellyfin / jellyfin-web

Web Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.38k stars 1.27k forks source link

[Issue]: CSS Container Jumping when Interacting with the container #4740

Open deffcolony opened 1 year ago

deffcolony commented 1 year ago

Please describe your bug

The bug

When interacting with the custom CSS container in the web app, there is a noticeable issue with the cursor and scrolling behavior. The problem occurs when the text within the container becomes long enough to require scrolling. At that point, two main issues are observed:

  1. Jumping Cursor: Whenever I click on the container to insert or edit text, the cursor unexpectedly jumps to the top of the textarea, causing inconvenience and difficulty in editing long CSS code.

  2. Unwanted jump when typing: Additionally, when I type or make changes to the text, the container automatically jumps to the bottom, making it difficult to keep track of the changes and causing confusion.

Steps to Reproduce:

  1. Navigate to "Administration" > "Dashboard" > "General."

  2. Add a long CSS code or enter random text in the container, causing it to expand and require scrolling.

  3. Click on the container to interact with it.

Expected Behavior:

When clicking on the container, the cursor should remain at the clicked position, and there should be no annoying jump to the top.

Jellyfin Version

10.8.z

if other:

10.8.10

Environment

- OS: Ubuntu server
- Linux Kernel:
- Virtualization: Docker
- Clients:
- Browser:
- FFmpeg Version:
- Playback Method:
- Hardware Acceleration:
- GPU Model:
- Plugins:
- Reverse Proxy:
- Base URL:
- Networking:
- Storage:

Jellyfin logs

No response

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

https://github.com/jellyfin/jellyfin/assets/61471128/aad3aea2-ca86-4972-870c-e81d0239981a

Code of Conduct

dmitrylyzo commented 1 year ago

This line minimizes the text area (causing the window to scroll up), but it is needed to update the scrollHeight property. https://github.com/jellyfin/jellyfin-web/blob/b2f3720282eb65687ec38bc233e6f9661bbcd6ee/src/elements/emby-textarea/emby-textarea.js#L56

Sukhendu2002 commented 1 year ago

Hey @dmitrylyzo can you assign this issue to me, I want to work on this issue