Hitting "Enter" doesn't log in user

Created on 19 November 2021, about 3 years ago
Updated 8 April 2023, over 1 year ago

Typically a user can type in their username and password then hit ENTER to log in.

However, with this module, I must tab to the "Login" button and then hit ENTER.

I recommend improving the user experience by accepting enter on the last input field to reduce the steps needed to log in.

Additionally, not sure why there are inactive scroll bars within the modal?

Feature request
Status

Active

Component

Code

Created by

🇺🇸United States joshuautley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States loze Los Angeles

    this seems to be an issue with any drupal form in a dialog, not specific to this module.

    I was able to make it work by adding this to my themes js.

    $(window).on('dialog:aftercreate', function (event, dialog, $element, settings) {
        const $button = $element.find('input[type="submit"]').first();
        if($button.length) {
          $element.on('keypress', function (ev) {
            if (ev.keyCode == 13) {
              ev.preventDefault();
              $button.mousedown();
            }
          });
        }
      });
    

    I got the idea from here https://www.drupal.org/project/entity_browser/issues/2887697

  • 🇫🇮Finland jukka792

    I tried this, added to my global.js but didnt work

Production build 0.71.5 2024