If claiming letters from the center, the user can just start typing.
But for a steal, they need another keybinding to initiate the claim
phase and Enter seems like a reasonable option for this.
return;
}
- /* Enter: submit word during claim. */
- if (key === "ENTER" && this.state.claim_active) {
+ /* Enter: submit word during claim, or start a claim. */
+ if (key === "ENTER") {
e.preventDefault();
- if (this.state.claim_rack.length >= 4) {
- this.submit_word();
+ if (this.state.claim_active) {
+ if (this.state.claim_rack.length >= 4) {
+ this.submit_word();
+ }
+ } else if (!this.state.claiming && !this.state.claim_player) {
+ this.start_claim();
}
return;
}