danfickle / openhtmltopdf

An HTML to PDF library for the JVM. Based on Flying Saucer and Apache PDF-BOX 2. With SVG image support. Now also with accessible PDF support (WCAG, Section 508, PDF/UA)!
https://danfickle.github.io/pdf-templates/index.html
Other
1.93k stars 360 forks source link

Firefox selected attribute not working for <option> value that is different from the label #907

Open lcw6a opened 1 year ago

lcw6a commented 1 year ago

I tried an example from https://github.com/danfickle/openhtmltopdf/wiki/Form-Controls

Example html file looks like this:

 <select name="select-input">
   <option value="1">Option One</option>
   <option value="2" selected="">Option Two</option>
   <option value="3">Option Three</option>
   <option value="4">Option Four</option>
 </select>

 <select name="select-input">
   <option value="Option One">Option One</option>
   <option value="Option Two" selected="">Option Two</option>
   <option value="Option Three">Option Three</option>
   <option value="Option Four">Option Four</option>
 </select>

Firefox: sample