fix(parser): keep a <button> inside <select> open

CR
19h ago
+29-1

Fixes #2579

Opening a <button> closed an open <select>, because button used formTags in openImpliesClose, which includes select. A customizable select may now start with a <button> (whatwg/html#10548), so button gets its own set: the form tags without select.

A button still closes an open button, input, option and the other form tags, as before. The new tests cover the issue's example and nested buttons.

Summary by CodeRabbit

  • Bug Fixes
    • Updated HTML parsing so a <button> inside <select> remains open until its explicit closing tag, preserving customizable select content.
    • A new <button> still implicitly closes an already-open button.