search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

MVC Popup Window - Stop closing when clicking out of window

Asked by B
7 years ago.

Hi thre
I am using Daypilot MVC Popup Window extender

How do I stop closing the modal window when I click outside the modal window.

tried hideOnMouseOut and soent seems to be working
var modal = new DayPilot.Modal();
modal.top = 50;
modal.width = 720;
modal.zIndex = 1200;
modal.border = "10px solid #d0d0d0";
modal.hideOnMouseOut = false;

Comment posted by B
7 years ago.

Could you reply

Answer posted by Dan Letecky [DayPilot]
7 years ago.

With the latest version of DayPilot.Modal (2.6) you can use the following code:

modal.onClose = function(args) {
  if (args.backgroundClick) {
    args.preventDefault();
  }
};

See also:
https://code.daypilot.org/81367/daypilot-modal

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.