Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8866761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:52:22+00:00 2026-06-14T16:52:22+00:00

We have an interface design that displays data fields in regular HTML elements, and

  • 0

We have an interface design that displays data fields in regular HTML elements, and only expose an input form when user clicks on the display element.

<div class="header-container">
    <header class="header-displayName"></header>

    <form class="form" style="display: none;">
    <section><label>First Name</label>
        <span><input type="text" class="form-input" placeholder="first name"></span></section>
    <section><label>Last Name</label>
        <span><input type="text" class="form-input" placeholder="last name"></span></section>
        <div class="hidden-submit"><input type="submit" tabindex="-1"/></div>
    </form>
</div>

In the case above, user clicks on the header element, which has been wired in jquery to hide itself and show the form. On pressing Enter key, the form also hides itself and shows back the header, while simultaneously making an Ajax request to submit the form data.

The issue now is how to enhance the user experience the next step, where the user tabbing or clicking out of the form onto elsewhere in the document will have the form realise it needs to hide and submit as usual.

I tried the blur event for the form, but later realise it is merely the bubbling of the blur events from individual input elements within, thus resulting in the form hiding/submitting on merely losing focus of the firstName input; the user doesn’t get a chance to work on the lastName input. Of course, if I tried a stopPropagation() on each input field, the form never blurs since it does not possess a blur event of its own.

How can I reliably capture a blur event at the form level?

To provide more context to this implementation, it is a reusable UI component, so it is not really statically placed in a single page document. They may even appear multiple times in a same document. They should not do any wiring at the document level that potentially mess up other components. All fields in such forms are optional as well, so one cannot count on all fields to be filled before submitting.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T16:52:24+00:00Added an answer on June 14, 2026 at 4:52 pm

    Found that jquery provides a pseudo selector check “:focus“; this makes it easier to listen for blur at the form level, but check if any other sibling input elements got the focus after a slight delay.

    setTimeout(function(){
      if (!$('.form-input').is(':focus')) {
        $('.form').submit();
      }
    }.bind(this), 10);
    

    Alternatively the selector can be applied to the form ‘.form input’ or some other descendant selector to cover the input fields of interest.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have lot of object with this kind of design : Interface and several
I'm trying to design my app's interface in IB using a storyboard and have
Let's say we have interface window_creator that responsible for creation of windows. For simplicity
I'm developing an app that handle sets of financial series data (input as csv
I have an interface that contain the method void DoCommand(); . now I'll force
I have a website that allows a user to save text content and then
I have a state machine design that needs to support playback. We have states
What is your best practical user-friendly user-interface design or principle? Please submit those practices
I have this pimpl design where the implementation classes are polymorphic but the interfaces
I have interface IConfigurationSource { .... } and class FileConfigurationSource : IConfigurationSource { FileConfigurationSource(string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.