The Bug:
Pressing the enter key signs a book whose title is only spaces, while the "Sign and Close" button is disabled.
The "Sign and Close" button is disabled while the title of a book is blank, but pressing the enter key still signs the book when the title is only spaces. The book is then signed with an empty title and is just called "Written Book".
Steps to Reproduce:
Give yourself a book and quill by using the command provided below.
/give @s minecraft:writable_bookUse it, write anything on the first page, and click "Sign".
Type three spaces as the title and nothing else.
Press the enter key.
Observe if the book is signed.
Observed Behavior:
Pressing the enter key signs the book with an empty title, even though the "Sign and Close" button is disabled.
Expected Behavior:
Pressing the enter key would do nothing while the title is blank, just like the "Sign and Close" button.
Can confirm in 26.4 Snapshot 5.
BookSignScreen#keyPressedonly checks!this.titleBox.getValue().isEmpty(), while the "Sign and Close" button's responder uses!StringUtil.isBlank(value), so a title of only spaces can still be signed with Enter.