In adding an item, if user has inputted either required or not required, what's the best confirmation if user clicked outside the modal or press ESC? Some scenarios could be a user accidentally press the ESC or clicked outside the modal and then let user enter again all the expected data on all the input fields.

  • I would assume this meant cancelling the action and you typically should not ask for confirmation when they cancel (very annoying). But it is hard to say more with absolutely no detail in your question.
    – user31143
    Jan 20, 2016 at 8:44
  • Allowing user to click outside the modal means ignoring the inputs, and somehow accidentally press the esc or clicked outside. The user would enter again the data to the expected fields.
    – Sknny
    Jan 20, 2016 at 8:50

2 Answers 2


i think you should make the user to confirm leaving ( only if he have entered data ) if he pressed out side , hit ESC or hit cancel . it will be simple ( You have unsaved data , are you sure you want to leave ? ) if he hit yes and open the dialog again , he shouldnt see his unsaved data . also consider how critical is the data entered and its size for example if its one text field , no confirmation needed


The content in the overlay is urgent, and users are more likely to notice it in an overlay. I think it's important to have a prominent close button, to close it when click outside the model. Also, a cancel button at the bottom of the form in case they don't want to fill it.

  • Poorly implemented overlays and lightboxes are not only frustrating for users, but can also be disastrous for conversion and task completion. Use the five W’s – Who, What, When, Where, and Why – to determine whether an overlay is truly the most appropriate design solution, and how you should implement it. Jan 20, 2016 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.