Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Dialog's parent page shouldn't be removed when dialog is open #2558

Closed
kurteknikk opened this issue Sep 28, 2011 · 9 comments
Closed

Dialog's parent page shouldn't be removed when dialog is open #2558

kurteknikk opened this issue Sep 28, 2011 · 9 comments

Comments

@kurteknikk
Copy link

Hi,

I noticed that the dialog's parent page is removed from dom when the dialog is open.
I think this is not the intension that we want since we're even discussing about "Dialog transitions should leave previous page visible" at: #2211

To confirm this behavior follow this simple 3 steps from the jquery mobile test pages:

  1. go to: http://jquerymobile.com/test/docs/pages/
  2. click on: Dialogs
    -> watch the page-dialogs.html page being loaded in the dom
  3. click on: Open dialog
    -> notice that this dialog's parent (i.e page-dialogs.html) has be removed from the dom

I didn't see any similar issues open but i think that this has to be solved before issue #2211 can be solved.

@ghost ghost assigned jblas Sep 28, 2011
@MauriceG
Copy link
Contributor

@jblas
It seems, this just happens, if the dialog is loaded from a external file.
Non-native-selects are not affected from this issue.
They are cleanly removed cause of a very good job of @johnbender.
May take a look at issues: #2493, #2461 and #2183.

@MauriceG
Copy link
Contributor

And finally i've found it: #2289

@ghost ghost assigned johnbender Oct 6, 2011
@johnbender
Copy link
Contributor

@johnbender
Copy link
Contributor

@kurteknikk @MauriceG

Just to be clear, I'm not convinced we want to have this as the default behavior (as noted in the link). If this is a serious issue please use data-dom-cache=true on the parent page for the time being.

[edit] should be true not false :/

@toddparker
Copy link
Contributor

I think for 1.0, this is going to be too big of a change at this stage. If the dom cache attribute is a usable workaround for people, we can review this post 1.0. I have a lot of improvements in mind for dialogs/overlays.

@webmat
Copy link

webmat commented Nov 11, 2011

I'm also of the opinion that ideally, the page opening the dialog should stay in the DOM.

In my case I wanted play with the opacity of the space around the dialog, to achieve sexyness :-) In my case the data-dom-cache="true" workaround works because I'm opening this dialog from a singleton page (e.g. /account).

But that workaround isn't great when the dialog is opened from a dynamic page (e.g. /wines/[wine-id]). That's a whole lot of markup that could potentially stay in the DOM, depending on how much the user is browsing around :-)

That said, a post 1.0 fix works for me.

Thanks for the great framework, guys!

@jaspermdegroot
Copy link
Contributor

@kurteknikk
Copy link
Author

Great, thanks :)

@maurice2k
Copy link

And here's the patch:
#5239

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants