Side menu and modal window

hey everybody,

is there a good way to use sidemenu in combination with the modal window? as the sidemenu directive wraps the content in a position:fixed the modal window is out of the view. anyone that also run in this problem?

many thanks,
michael

Hi,

I don’t know if you mean that but I also want to use and display a modal window within the left / right panel of a ion-sidemenus item. But for now the modal window take the whole screen. I will try to fix this and if I find something, get back to you and post the fix here.

Hakan.

So, fortunately, this was easy to fix. In ionic-angular.js, line 496

.factory('$ionicModal', ['$rootScope', '$document', '$compile', '$animate', '$q', '$timeout', '$ionicPlatform', '$ionicTemplateLoader', function($rootScope, $document, $compile, $animate, $q, $timeout, $ionicPlatform, $ionicTemplateLoader) {
  var ModalView = ionic.views.Modal.inherit({
    initialize: function(opts) {
      ionic.views.Modal.prototype.initialize.call(this, opts);
      this.animation = opts.animation || 'slide-in-up';
      **this.parentSelector = opts.parentSelector || $document[0].body;**
    },
    // Show the modal
    show: function() {
      var self = this;
      var element = angular.element(this.el);

      document.body.classList.add('disable-pointer-events');
      this.el.classList.add('enable-pointer-events');

      self._isShown = true;

      if(!element.parent().length) {
        element.addClass(this.animation);
        
        **if (this.parentSelector !== $document[0].body) {
            element.css('position', 'static');
        }**
        
        $animate.enter(element, angular.element(**this.parentSelector**), null, function() {
        });

hey,

i changed in the ionic-angular.js v.0.9.23 the code but it still does not work. my problem is still that the content which is wrapped in the “pane” tag does not show the action sheet probably because the pane is position:fixed and that causes the action sheet to be not shown.