Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #31860

Re: Techniques to prevent accidental press of the Enter key that submits a FORM

Path csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Techniques to prevent accidental press of the Enter key that submits a FORM
Date Wed, 14 Dec 2016 18:00:36 +0100
Organization PointedEars Software (PES)
Lines 55
Message-ID <1687944.taCxCBeP46@PointedEars.de> (permalink)
References <28167554-422a-4b89-81e9-071e7475e821@googlegroups.com> <enter-20161214120502@ram.dialup.fu-berlin.de> <2269631.Lt9SDvczpP@PointedEars.de> <o2rl53$kk2$1@knightstalker.eternal-september.org> <1911160.Mh6RI2rZIc@PointedEars.de> <o2rrqc$d60$1@knightstalker.eternal-september.org>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace solani.org 1481734836 15831 eJwFwYEBgDAIA7CX6IBOzgG0/59gkk5wbzAZqdTJO+LzNatrq+oYCQVel9CCzUaNOWbOGn4YihD4 (14 Dec 2016 17:00:36 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Wed, 14 Dec 2016 17:00:36 +0000 (UTC)
User-Agent KNode/4.14.2
X-User-ID eJwFwYkBADAEBLCVPHUYp5T9R2hiCkb7geHY2j73lpF8xFKNuFo2fCuKcLNEdh63+VBOYxVKGV0RMeGu/QFlVRXQ
Face iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3Hdm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0Qgu9dX40aK8yU=
Xref csiph.com comp.lang.javascript:31860

Show key headers only | View raw


KnightStalker wrote:

> On 12/14/2016 10:19 AM, Thomas 'PointedEars' Lahn wrote:
>> KnightStalker wrote:
>> ^^^^^^^^^^^^^
>> Who?
> 
> Just add a space before the Capital S. Now if you don't like my name,
> just ignore it.

This is a Usenet newsgroup, not a chat room.  Pseudonyms are not "cool" 
here, but ridiculous.  I could ignore *you* for this impoliteness, and 
recommend to others to ignore you, but you do not want that to happen.
So here is your last chance to avoid it.
 
>>> On 12/14/2016 7:04 AM, Thomas 'PointedEars' Lahn wrote:
>>>> JFTR: The form is only submitted on pressing the Enter/Return key if
>>>> there is an *enabled* *submit* button and the element that has the
>>>> focus is an “input” element with a text type (“text”, “email” etc.)
>>> Multiple submit buttons?
>> Your approach works only if you remove the first, disabled, hidden submit
>> button.  Otherwise I cannot submit the form using the Return key in the
>> input even after I checked the checkbox.
> 
> No need to remove the disable button, that is what prevents an
> accidental submission by pressing the Enter/Return key.

As a user, after I have checked the checkbox, I want to be able to submit it 
using any means.  Otherwise this form would look broken to me.

> Depending on the ua tested in (firefox for example), tab to the submit
> button and press (Enter/Return || space) key. Current versions of Google
> Chrome and Microsoft Edge, no tabbing required.

If the user had been aware that they could use the Tab key, they would not 
have, before you prevented it, accidentally submitted the form using the 
Return key, would they?
 
> Always a good ideal to test on more then on ua yes?

Yes.
 
>> Why did you think you need multiple submit buttons?
> 
> My needs have nothing to do with this.

Don’t be obtuse.  Oh, wait.

Score adjusted.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Techniques to prevent accidental press of the Enter key that submits a FORM justaguy <lichunshen84@gmail.com> - 2016-12-13 18:48 -0800
  Re: Techniques to prevent accidental press of the Enter key that submits a FORM "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-12-14 10:14 +0100
    Re: Techniques to prevent accidental press of the Enter key that submits a FORM justaguy <lichunshen84@gmail.com> - 2016-12-14 05:42 -0800
  Re: Techniques to prevent accidental press of the Enter key that submits a FORM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-14 13:04 +0100
    Re: Techniques to prevent accidental press of the Enter key that submits a FORM justaguy <lichunshen84@gmail.com> - 2016-12-14 05:45 -0800
    Re: Techniques to prevent accidental press of the Enter key that submits a FORM KnightStalker <7oo7le7roupie@gmail.com> - 2016-12-14 09:33 -0500
      Re: Techniques to prevent accidental press of the Enter key that submits a FORM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-14 16:19 +0100
        Re: Techniques to prevent accidental press of the Enter key that submits a FORM Jake Jarvis <pig_in_shoes@yahoo.com> - 2016-12-14 16:42 +0100
          Re: Techniques to prevent accidental press of the Enter key that submits a FORM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-14 18:00 +0100
        Re: Techniques to prevent accidental press of the Enter key that submits a FORM KnightStalker <7oo7le7roupie@gmail.com> - 2016-12-14 11:27 -0500
          Re: Techniques to prevent accidental press of the Enter key that submits a FORM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-14 18:00 +0100
            Re: Techniques to prevent accidental press of the Enter key that submits a FORM KnightStalker <7oo7le7roupie@gmail.com> - 2016-12-16 11:03 -0500
              Re: Techniques to prevent accidental press of the Enter key that submits a FORM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-16 17:54 +0100
                Re: Techniques to prevent accidental press of the Enter key that submits a FORM KnightStalker <7oo7le7roupie@gmail.com> - 2017-01-06 15:08 -0500
      Re: Techniques to prevent accidental press of the Enter key that submits a FORM justaguy <lichunshen84@gmail.com> - 2016-12-15 14:21 -0800
        Re: Techniques to prevent accidental press of the Enter key that submits a FORM KnightStalker <7oo7le7roupie@gmail.com> - 2016-12-16 12:24 -0500
  Re: Techniques to prevent accidental press of the Enter key that submits a FORM John Harris <niam@jghnorth.org.uk.invalid> - 2016-12-14 15:07 +0000
    Re: Techniques to prevent accidental press of the Enter key that submits a FORM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-12-14 23:31 +0100
    Re: Techniques to prevent accidental press of the Enter key that submits a FORM justaguy <lichunshen84@gmail.com> - 2016-12-15 14:15 -0800
  Re: Techniques to prevent accidental press of the Enter key that submits a FORM Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-12-17 21:02 +0000

csiph-web