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 7868131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:54:17+00:00 2026-06-03T00:54:17+00:00

I have some functions in my Javascript code that will perform long operations such

  • 0

I have some functions in my Javascript code that will perform long operations such as painting various images to a canvas. While these functions are happening, I do not want the user to be able to access buttons on the UI, so I place a large modal div over everything to cover up the buttons while the process is taking place. I soon realized however that since the code is continuous, the UI never actually has a chance to update, and the modal div never actually appears since it is removed at the end of the process.

My question is, is it really necessary to cover up the UI in this type of scenario? If the user does press another button while the operation is being performed, will the new process wait until the previous process is done before starting? Or perhaps since the modal UI was supposed to be up at the moment they clicked the UI, the modal will prevent the new process from starting. The alternative is that I could set a time out directly after bringing the modal div up giving the UI time to update before beginning the process, but I am not sure that this is necessary.

  • 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-03T00:54:18+00:00Added an answer on June 3, 2026 at 12:54 am

    Yes, you need the cover div, and no, new processes won’t wait until the previous process is done before starting (unless you coded them to do so).

    A simple trick to force a repaint is to use setTimeout with 0 milliseconds. The re-layout should happen as soon as possible.

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

Sidebar

Related Questions

I have a main function in javascript that is function a() { some code
I've been writing some jQuery functions that have JavaScript variables and looping, etc inside
I have some working Javascript code that generates an RDF/XML document using variables picked
Let's say I have a UIWebView with some javascript functions. I want those javascript
i have a object in javascript and some already defined functions. but how can
I have some third-party Javascript that has statements like this: FOO = function() {
Here is the situation. I have some javascript that looks like this: function onSubmit()
I have some functions that use opengl to draw lines on the screen (health
I have a HTML option element that I want to perform some actions when
I have some HTML code that is created dynamically and includes potentially dozens of

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.