       if prevView?.stack?.indexOf(name) > -1
         isPush = false
 
+      if options.isDialog
+        @willShowDialog = true
+
       # Custom transitions means we remove swiping.
       if options.transition
         @undelegateEvents()

    # If no `el` is defined in options, create a new element and append to the
    # `#views` element. Create the view, hide it and add it to the stack.
    create: (name, View, options = {}) ->
      unless options.el?
        options.el = $("<div class='view' id='#{@identify(name)}' />")
        @$el.append options.el

      view = new View(options)
      view.__key = name
      view.__head = view.$(@headClass)
      view.__body = view.$(@bodyClass)
      view.$el.hide()
      @views[name] = view

    # Get the view from the dictionary, or create it if it doesn't exist.
    # Decide whether to pop or push the view, and build the stack if its the

        @transitionView prevView, false

        # ... and then set initial transforms
        @transform prevView, 0, not isPush unless @willShowDialog

        unless @willHideDialog
          @transform nextView, @endRatio(isPush), isPush

        @$el.get(0).offsetWidth

        # Add transitions and set new transforms
        @transitionView nextView, true
        @transform nextView, 0, not isPush

        unless @willShowDialog
          @transitionView prevView, true
          @transform prevView, @endRatio(not isPush), not isPush

        # After the transition has occured, hide
        window.clearTimeout @transitionOutTimeout
        @transitionOutTimeout = window.setTimeout (=>
          nextView.delegateEvents()
          prevView.$el.removeClass("active")
          prevView.$el.hide() unless @willShowDialog
          @clearTransforms nextView
          @clearTransforms prevView
        ), @ms + 100
