[Bug]: Author text input gets clipped when editing book details #1790

Closed
opened 2026-04-24 23:58:19 +02:00 by adam · 5 comments
Owner

Originally created by @mikiher on GitHub (Mar 3, 2024).

Describe the issue

When you manually type a new author name, after typing a few letters, the ending gets clipped and you don't see what you type until you press Enter (and then the Authors field is populated correctly with the full author name you typed).

While typing, all the letters you typed briefly flicker on and then get truncated.

Steps to reproduce the issue

  1. Open a book's details tab

  2. Go the Authors field

  3. Add a new author by typing it manually (e.g. "J. K. Rowling")

  4. After typing the name, but before hitting Enter, the field looks like this:
    Screenshot 2024-03-03 224218

  5. After hitting Enter, The field is correctly populated, like this:
    Screenshot 2024-03-03 224600

Audiobookshelf version

v2.8.0

How are you running audiobookshelf?

Built from source

Originally created by @mikiher on GitHub (Mar 3, 2024). ### Describe the issue When you manually type a new author name, after typing a few letters, the ending gets clipped and you don't see what you type until you press Enter (and then the Authors field is populated correctly with the full author name you typed). While typing, all the letters you typed briefly flicker on and then get truncated. ### Steps to reproduce the issue 1. Open a book's details tab 2. Go the Authors field 3. Add a new author by typing it manually (e.g. "J. K. Rowling") 4. After typing the name, but before hitting Enter, the field looks like this: <img width="166" alt="Screenshot 2024-03-03 224218" src="https://github.com/advplyr/audiobookshelf/assets/22557398/045a3737-0928-47df-8c45-73a606c4d1dd"> 5. After hitting Enter, The field is correctly populated, like this: <img width="158" alt="Screenshot 2024-03-03 224600" src="https://github.com/advplyr/audiobookshelf/assets/22557398/b3582327-f58d-476e-a6fd-bc8f8ae8faa7"> ### Audiobookshelf version v2.8.0 ### How are you running audiobookshelf? Built from source
adam added the bug label 2026-04-24 23:58:19 +02:00
adam closed this issue 2026-04-24 23:58:20 +02:00
Author
Owner

@advplyr commented on GitHub (Mar 3, 2024):

I noticed that recently also. I may have broken something because that wasn't always the case.

@advplyr commented on GitHub (Mar 3, 2024): I noticed that recently also. I may have broken something because that wasn't always the case.
Author
Owner

@mikiher commented on GitHub (Mar 3, 2024):

Analysis:

In MultiSelectQueryInput.vue, when a new letter is pressed, we call setInputWidth, which registers a function to recalcualte and set the width after 50 ms. That function is called and sets a correct value.

However after that, some other code (I have not identified exactly which, but I suspect it is some internal Vue framework code, perhaps the one that takes care of reacting to the input box v-model change) is changing the width back to its default value, which is 40px.

The above causes for the flicker (because the width property changes value twice) and the truncation (since the final width value is always 40px).

@mikiher commented on GitHub (Mar 3, 2024): Analysis: In MultiSelectQueryInput.vue, when a new letter is pressed, we call setInputWidth, which registers a function to recalcualte and set the width after 50 ms. That function is called and sets a correct value. However after that, some other code (I have not identified exactly which, but I suspect it is some internal Vue framework code, perhaps the one that takes care of reacting to the input box v-model change) is changing the width back to its default value, which is 40px. The above causes for the flicker (because the width property changes value twice) and the truncation (since the final width value is always 40px).
Author
Owner

@mikiher commented on GitHub (Mar 3, 2024):

Resolution:

After trying to fix this by increasing the setTimout time (which works but looks ugly, and also flickers), I found that width can have a fit-content value. I set the initial element style to width: fit-content, and removed the call to setInputWidth altogether. This seems to work perfectly.

I will send a PR.

@mikiher commented on GitHub (Mar 3, 2024): Resolution: After trying to fix this by increasing the setTimout time (which works but looks ugly, and also flickers), I found that `width` can have a `fit-content` value. I set the initial element style to `width: fit-content`, and removed the call to setInputWidth altogether. This seems to work perfectly. I will send a PR.
Author
Owner

@mikiher commented on GitHub (Mar 3, 2024):

I noticed that the Geners, Tags, and Narrators suffer from the same issue (in MultiSelect.vue). I will fix there as well.

@mikiher commented on GitHub (Mar 3, 2024): I noticed that the Geners, Tags, and Narrators suffer from the same issue (in MultiSelect.vue). I will fix there as well.
Author
Owner

@advplyr commented on GitHub (Mar 17, 2024):

Fixed in v2.8.1

@advplyr commented on GitHub (Mar 17, 2024): Fixed in [v2.8.1](https://github.com/advplyr/audiobookshelf/releases/tag/v2.8.1)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1790