Search code examples
simplemodal

simplemodal close function


I love the osx version of the simple modal. However, I would like to do some data editing in the opened modal box.

Now when the user clicked outside of the modal, it'll close. So if the user accidentally clicked the outside of the modal, their information will be lost.

How do I disable closing when click outside of the modal? thanks!


Solution

  • Go to Line 28 of the file "osx.js" that is included in Simple Modal OSX Style Dialog. Change overlayClose: true to overlayClose: false.