prevent submitting spread 'form' with enter

this prevents diaspora getting selected when actually filling the mastodon field. HTML selected the first button in a form by default, and this will always be diaspora
lektura
max.mehl 2018-09-28 14:21:24 +02:00
parent e3e76a60b4
commit ad8f3b8e3a
No known key found for this signature in database
GPG Key ID: 2704E4AB371E2E92
1 changed files with 1 additions and 1 deletions

View File

@ -1,4 +1,4 @@
<form action="https://fsfe.org/share" method="GET" class="share-buttons {{.type}}" target="_blank">
<form action="https://fsfe.org/share" method="GET" class="share-buttons {{.type}}" target="_blank" onkeypress="return event.keyCode != 13;">
<input name="popup" id="no-share-popup-{{.type}}" type="radio" />
<input name="ref" value="pmpc-{{.type}}" type="hidden" />
<input name="url" value="{{ .url }}{{ .lang }}" type="hidden" />