Ticket #1484839 (closed Bugs: fixed)

Opened 10 months ago

Last modified 9 months ago

Login form field keeps empty when trying to use cached address

Reported by: HammerFall Owned by:
Priority: 1 - Highest Milestone: later
Component: Interface Version: 0.1-stable
Severity: minor Keywords:
Cc:

Description

It seems the login page is behaving weird. If I try to choose a cached login name/email address with the cursor down key and pressing enter the field gets filled empty. If I click on the cached address with mouse it works.

Reproducable with current Firefox and Safari Versions.

Attachments

bugfix1484839.patch (1.3 kB) - added by bvanheuverzwijn 10 months ago.
This patch removes the keypress listener on the username input.

Change History

Changed 10 months ago by thomasb

  • severity changed from major to minor

RoundCube has a keyboard listener set on the input field. Maybe this changes the default behavior of the browser. But this is certainly not a "major" bug.

Changed 10 months ago by bvanheuverzwijn

This patch removes the keypress listener on the username input.

Changed 10 months ago by thomasb

Simply removing the event listener is not the way to go.

Changed 10 months ago by bvanheuverzwijn

Hi Thomas !

I posted on the dev ml why I would remove the keylistener on the username input. Here's a copy-paste !


I don't think this is a good UI behavior for these reasons :

- On many web apps, pressing 'enter' activates the submit button (this is the default 'enter' key behavior). I don't think users are used to press 'enter' to switch input focus. They use the 'tab' key instead.

- In case you let people choose their server in the login form, pressing 'enter' in the password input won't give focus to the server input, but will fire the submit action (but it should be possible to).

- This feature currently break Firefox and Safari concerning auto-complete (as reporting here).

Changed 10 months ago by till

  • milestone changed from 0.1.1 to later

Changed 9 months ago by robin

Please try the following patch. Tested on Firefox. It uses onkeyup for the login box, instead of onkeydown.

Index: program/js/app.js
===================================================================
--- program/js/app.js	(revision 1219)
+++ program/js/app.js	(working copy)
@@ -314,7 +314,7 @@
         var input_user = rcube_find_object('rcmloginuser');
         var input_pass = rcube_find_object('rcmloginpwd');
         if (input_user)
-          input_user.onkeypress = function(e){ return rcmail.login_user_keypress(e); };
+          input_user.onkeyup = function(e){ return rcmail.login_user_keyup(e); };
         if (input_user && input_user.value=='')
           input_user.focus();
         else if (input_pass)
@@ -1676,7 +1676,7 @@
   /*********************************************************/
 
   // handler for keyboard events on the _user field
-  this.login_user_keypress = function(e)
+  this.login_user_keyup = function(e)
   {
     var key = rcube_event.get_keycode(e);
     var elm;

Changed 9 months ago by robin

  • status changed from new to closed
  • resolution set to fixed

Fixed in r1226.

Note: See TracTickets for help on using tickets.