Closed Marc-Andre-Rivet closed 4 years ago
This seems reasonable, but I wonder if these need to be fixed widths? Is it problematic to let them grow with their content?
Inputs are weird beast and can't typically made to automatically grow with content, unlike other elements.
Typically this can be worked around by using something like <div contenteditable />
as the div will allow resizing - this won't automatically validate for numbers, etc. like the current field and you can actually start writing actual html into the div... I could also look into wrapping the input, position it absolutely + take all the available space, and use an identically styled span or div with the same content to force a resize - never used that method but I don't see any reason why it wouldn't work. I don't have a problem spending more time tweaking this into a more "dynamic" solution if we feel like it.
Ah right, number validation and other bits of <input>
behavior are nice. What if we size both the input and the total page count to fixed widths but based on the number of digits in page_count
instead of globally constant?
Modified the proposed fix to:
4ch
or '{}ch".format(len(page_count)+1)page_action='custom'
case where page_count
might be unkown
Closes #660
page_current
andpage_count
fields based on the number of pages (1ch/char + 1)page_current
field for the case where nopage_count
is defined (e.g.page_action='custom'
without the server returningpage_count