Open wolflu05 opened 10 months ago
I'm struggling to reproduce this issue. Is this a book that you imported from goodreads? Is it happening on every book? Also, what version are you using?
Sorry that I forgot to provide the version information. I installed it using the docker image (wars2k/booktracker@sha256:201b1f4c7d139418a48b8fe472f466eefd1c229014f1efb37b71384cd34876a1
(current latest)). This happens with all books no matter if they are imported using the book search or the manual entry. (Haven't tested with Goodreads imports because I have not used Goodreads).
I now tried to investigate the issue a bit more and it seems like that it's because safari adds <br>
to the innerHTML of the select elements and that adds a length of 4 to the stars string so setting 4 stars actually sends 8 which results in undefined. Determine the select option based in the innerHTML length is not a good idea, however I'm wondering why you don't just use a html select element that has options already built-in, but the easiest fix maybe would be to use the .innerText
and then trim any whitespace around it.
Setting the rating from the table view does not work and results in
undefined
. https://github.com/wars2k/booktracker/assets/76838159/e56615a6-62f0-4bbf-b68c-260c8c7644ab