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

  • Home
  • SEARCH
  • 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 6197851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:53:42+00:00 2026-05-24T03:53:42+00:00

I’m building an application that makes extensive use of jQuery UI Dialogs. I ran

  • 0

I’m building an application that makes extensive use of jQuery UI Dialogs. I ran into an issue that happens when opening multiple dialogs at once, and can’t really figure out how to fix it, if possible at all.

Basically, it goes like this:

  • User opens dialog A (top: 100px, height: 300px)
  • User opens dialog B (top: 100px, height: 300px)
  • User closes dialog A
  • All dialogs opened after dialog A shifts up. e.g.: dialog B top property substracts dialog A height (100px – 300px = -200px): dialogs vanish.

I’ve come to that conclusion by using Firebug Inspect and Web Developer.

If dialog B (opened after dialog A) is closed first, the problem does not occur. I’ve tried with a vanilla UI as well (i.e.: no stylesheets other than jQuery’s loaded), and it still happens. There seems to be an trigger when a dialog closes that I can’t override.

Using position: fixed; ( as suggested by @TheVillageIdiot ) fixes it, but is still happens when the dialog is destroyed.

Here’s an example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <title></title>

    <link type="text/css" rel="stylesheet" media="all" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css">
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

</head>
<body>

<div id="dialog-1">

</div>
<div id="dialog-2">

</div>

<script type="text/javascript">
$('#dialog-1').dialog({
    close: function() {
        $(this).dialog('destroy');      
    },
    height: 300,
    position: [100, 100],  
    show: 'scale',
    hide: 'drop',
    resizable: false,
    title: 'A',
});

$('#dialog-2').dialog({
    close: function() {
        $(this).dialog('destroy');      
    },
    height: 300,
    position: [100, 100],
    show: 'scale',
    hide: 'drop',
    resizable: false,
    title: 'B',
});
</script>

</body>
</html>

Any suggestions are much appreciated.

  • 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-05-24T03:53:43+00:00Added an answer on May 24, 2026 at 3:53 am

    It’s probably because your dialogs aren’t in position: absolute, so the position (i.e. top:X) of dialog B is calculated relatively to the position (top:Y) of dialog A.

    So let’s say that absolute position of dialog B is top: 20px, and dialog A is top: 10px, the assigned CSS position of dialog B will be top: 10px because it’s relative to dialog A. So when dialog A is destroyed, the position of dialog B (top: 10px) becomes relative to the element that was before dialog A, most likely higher, hence going upwards in your window.

    The solution is quite simple: set your dialog CSS position attribute to absolute. jQuery UI should catch up and calculate the positions properly.

    P.S.: Just make sure you define your CSS absolute position after loading the jQuery UI CSS stylesheet, to make sure that yours override jQuery’s.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

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.