07-26-2021, 12:48 AM
(This post was last modified: 07-26-2021, 03:36 AM by Alexandre Machado.)
The forum messed up my response... so I lost everything.
Let's try again:
I think that using ENTER as TAB is a bad idea. Very bad idea.
There are 2 problems here:
1) The de facto standard is:
TAB -> move to the next focusable control
ENTER -> submit current form
I know that hundred of years ago
ENTER was used to do that. I've been asked thousands of times to implement this behavior in Windows/GUI applications over the years (and the web too). But this time is long gone. Not a single main stream web site/application will work like that.
Unless the end-users are limited to this single web application, they should be used to the TAB key by now.
I wish we could configure our browsers to map the ENTER key to TAB, so everybody would have it working as they wanted, but that's not possible.
2) Once browsers don't support the ENTER key, JavaScript code is required everywhere (in every single page or IFRAME in the page). This causes several problems:
You need to decide at runtime if the control can or cannot receive keyboard focus. This is straightforward for controls like inputs (e.g. IWEdits) but not so simple for complex controls composed of several other elements like a Grid, accordion, page control, etc.
Also, it is very hard to get the same behavior using both the ENTER and the TAB (this is what any customer would expect, right?). Remember that the TAB key moves the focus out of your page as well (e.g. to the browser address bar). So, if one user decides to use the TAB, the application would behave in one way, and for another user who is using the ENTER key, the application would behave differently.
That's why I insist on this every time: It is a very bad idea to implement this.
It is better to show your users that the web is not their old and beloved DOS 6.1. It's better to get used to it.
Let's try again:
I think that using ENTER as TAB is a bad idea. Very bad idea.
There are 2 problems here:
1) The de facto standard is:
TAB -> move to the next focusable control
ENTER -> submit current form
I know that hundred of years ago
ENTER was used to do that. I've been asked thousands of times to implement this behavior in Windows/GUI applications over the years (and the web too). But this time is long gone. Not a single main stream web site/application will work like that. Unless the end-users are limited to this single web application, they should be used to the TAB key by now.
I wish we could configure our browsers to map the ENTER key to TAB, so everybody would have it working as they wanted, but that's not possible.
2) Once browsers don't support the ENTER key, JavaScript code is required everywhere (in every single page or IFRAME in the page). This causes several problems:
You need to decide at runtime if the control can or cannot receive keyboard focus. This is straightforward for controls like inputs (e.g. IWEdits) but not so simple for complex controls composed of several other elements like a Grid, accordion, page control, etc.
Also, it is very hard to get the same behavior using both the ENTER and the TAB (this is what any customer would expect, right?). Remember that the TAB key moves the focus out of your page as well (e.g. to the browser address bar). So, if one user decides to use the TAB, the application would behave in one way, and for another user who is using the ENTER key, the application would behave differently.
That's why I insist on this every time: It is a very bad idea to implement this.
It is better to show your users that the web is not their old and beloved DOS 6.1. It's better to get used to it.

