How can I prevent modal close on outside click ?

Hello everyone,

I'm working on a widget modal container in a form. I want to prevent modal close on outside click. The modal will be closed only on the button click.

I have tried this way for auto-open modal with custom widget :

function PbAutoPopupCtrl($scope, modalService) {

  'use strict';
    var options = {
        backdrop: 'static',
        keyboard: false
    };

  $scope.$watch('properties.watchedVar', function(newVal, oldVal) {
    if (newVal) {
        modalService.open($scope.properties.modalId, options);
    }
  }, true);
}

but it didn't work !

Best regards,

Hi,

You can have a look at this stackoverflow question

HTH
Romain