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

Prevent popup from closing when you click outside popup #4727

Closed
arschmitz opened this issue Jul 19, 2012 · 11 comments
Closed

Prevent popup from closing when you click outside popup #4727

arschmitz opened this issue Jul 19, 2012 · 11 comments

Comments

@arschmitz
Copy link
Contributor

It would be nice if there was an option for the popups to have it stay open if you click outside the popup. Sometimes you may want the user to complete an action in the popup before it is closed.

@toddparker
Copy link
Contributor

That's a good idea, but it's worth noting that we tie these into the history stack so the back button will still close the popup in it's current form.

@gabrielschulhof
Copy link

This is related to #4649.

@arschmitz
Copy link
Contributor Author

History aside i think this would still be a good option because in some situations you may just want to stop the popup from being closed by accident. this way it would force them to actually hit a close button or something similar. I have a popup that is opened pragmatically. i don't mind the popup being closed by the user and am not worried about back button. i just want the user to have to click either close or next vs potentially closing by accident by clicking outside.

Also in regards to the backbutton issue here and on issue #4649 This option would solve #4649 in some situations (though not all) on devices without a physical back button (ios) in phonegap or standalone mode this would solve. (not sure how the physical back button works in phonegap in android??)

finally the situation @gabrielschulhof noted with a popup on a page with hash listening disabled and (if such an option existed) history not being tracked for popup just have it go back to last page in history this seems like what the expected result of such a sequence would be to me. and if this isnt the desired sequence then that would be up to the person creating the pages to handle properly.

i have a modified version of the popup widget working with both options i'm trying to polish up for fringe cases and it seems to work well if this is of any interest i'm happy to share. (i'm sure it would need some reworking before actually being used!)

@gabrielschulhof
Copy link

Absolutely! PRs always welcome!

@samikrc
Copy link

samikrc commented Aug 15, 2012

Interested in this as well. A modal popup dialog will be great. Agree w/ the comment from arschmitz.

@jaspermdegroot
Copy link
Contributor

I am closing this ticket as a feature request and added a link to it here https://github.com/jquery/jquery-mobile/wiki/Feature-Requests. We will reopen when we are going to work on this.

Edit: In the meantime PR's are still welcome of course ! :-)

@bbarnell
Copy link

Yes, put me down for this enhancement as well. This is a show stopper for me.

@toddparker toddparker reopened this Sep 24, 2012
@toddparker
Copy link
Contributor

Re-opening for 1.3

@youradds
Copy link

Ah man, so this isn't actually possible yet then :( I was trying to submit a form via AJAX - and return an error message in the same block if an error was found. If not, it would show a "your message has been sent" ... but sounds like there is no way to stop a popup from closing after clicking a "submit" button in 1.2?

@gabrielschulhof
Copy link

Implemented in 352fb0b.

@Rameshwar007
Copy link

Thanks for solving popup overlay issue!

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