angular-bootstrap-lightbox icon indicating copy to clipboard operation
angular-bootstrap-lightbox copied to clipboard

Lightbox.keyboardNavEnabled overwritten by hardcoded values.

Open jerimiahbaldwin opened this issue 8 years ago • 0 comments

Seems that the Lightbox.keyboardNavEnabled is not working. It would appear that the parameter is being forced to "true" when openModal is called. Me thinks this is probably not the desired behavior as it completely overrides the user setting from controller.

` Lightbox.openModal = function (newImages, newIndex, modalParams) { Lightbox.images = newImages; Lightbox.setImage(newIndex);

  // store the modal instance so we can close it manually if we need to
  Lightbox.modalInstance = $uibModal.open(angular.extend({
    'templateUrl': Lightbox.templateUrl,
    'controller': ['$scope', function ($scope) {
      // $scope is the modal scope, a child of $rootScope
      $scope.Lightbox = Lightbox;

      Lightbox.keyboardNavEnabled = true;
    }],
    'windowClass': 'lightbox-modal'
  }, modalParams || {}));

`

jerimiahbaldwin avatar May 10 '16 20:05 jerimiahbaldwin