Reorder chat form inputs so submit has priority

When you press enter to submit a form and there are multiple submittable
inputs (e.g. type="image" / type="submit"), Firefox chooses the one that
appears first in markup. Before this commit the image input (aka the "I
want a new captcha" button) appeared before the submit button which
meant pressing enter just reloaded the captcha instead of submitting the
comment.
このコミットが含まれているのは:
n9k 2022-06-11 22:59:39 +00:00
コミット d621f8ceda
2個のファイルの変更2行の追加1行の削除

ファイルの表示

@ -41,11 +41,11 @@ const jsmarkup_chat_form = `\
<span data-verbose="false">&times;</span>
</span>
</div>
<input id="chat-form_js__submit" type="submit" value="Chat" accesskey="p" disabled>
<input id="chat-form_js__captcha-digest" type="hidden" name="captcha-digest" disabled>
<input id="chat-form_js__captcha-image" type="image" width="72" height="30">
<input id="chat-form_js__captcha-answer" name="captcha-answer" placeholder="Captcha" disabled>
<input id="chat-form_js__settings" type="image" src="/static/settings.svg" width="28" height="28" alt="Settings">
<input id="chat-form_js__submit" type="submit" value="Chat" accesskey="p" disabled>
<article id="chat-form_js__notice">
<button id="chat-form_js__notice__button" type="button">
<header id="chat-form_js__notice__button__header"></header>

ファイルの表示

@ -364,6 +364,7 @@ noscript {
}
#chat-form_js__submit {
grid-column: 5;
grid-row: 2;
}
#chat-form_js:not([data-captcha]) > #chat-form_js__captcha-image,
#chat-form_js:not([data-captcha]) > #chat-form_js__captcha-answer {