Questions tagged [modal-dialog]

Refers to a graphical dialog used to display important information to the user. These dialogs appear above all other content, blocking application flow until user input is received.

Modal windows are commonly used in GUI systems to command user awareness and to display emergency states. On the Web, they are often used to show images in detail.

Frequent uses of modal windows include:

  • Drawing attention to vital pieces of information. This use has been criticised as ineffective because users are bombarded with too many dialog boxes, and habituate to simply clicking "Close", "Cancel", or "OK" without reading or understanding the message.

  • Blocking the application flow until information required to continue is entered, as for example a password in a login process. Another example are file dialogs to open and save files in an application.

  • Collecting application configuration options in a centralized dialog. In such cases, typically the changes are applied upon closing the dialog, and access to the application is disabled while the edits are being made.

  • Warning that the effects of the current action are not reversible. This is a frequent interaction pattern for modal dialogs, but it is also criticised by usability experts as being ineffective for its intended use (protection against errors in destructive actions) due to habituation. Actually making the action reversible (providing an "undo" option) is recommended instead.

See also: and

More info on Wikipedia

11991 questions
48
votes
30 answers

Twitter Bootstrap modal pushes html content to the left

If I open a modal dialog, through Twitter Bootstrap, I've noticed that it pushes all the html content of the page (i.e., in the container) to the left a little bit, and then puts it back to normal after closing itself. However, this only happens if…
EleventyOne
  • 7,300
  • 10
  • 35
  • 40
47
votes
10 answers

C# / .NET messagebox is not modal

Why is a C#/.NET message box not modal? Accidentally, if the message box goes behind our main UI, then the main UI doesn't respond, until we click OK (on our message box). Is there a workaround other than creating a custom message box?
emeh
  • 823
  • 1
  • 7
  • 21
46
votes
9 answers

Custom "confirm" dialog in JavaScript?

I've been working on an ASP.net project that uses custom 'modal dialogs'. I use scare quotes here because I understand that the 'modal dialog' is simply a div in my html document that is set to appear "on top" of the rest of the document and is not…
Vivian River
  • 31,198
  • 62
  • 198
  • 313
45
votes
6 answers

What is the proper way to dismiss a modal when using storyboards?

Using storyboards, what is the proper way to dismiss a modal? using IBAction and writing code to dismiss after a button click? using segue and notify the parent view controller after a button click?
aryaxt
  • 76,198
  • 92
  • 293
  • 442
45
votes
6 answers

jQuery: Load Modal Dialog Contents via Ajax

Currently my Modal Dialog is like this