     getInitialState: ->
         show: false
 
-    onOkButton: -> @state.onOk?(this)
-    onCancelButton: -> @state.onCancel?(this)
-    onButton: (btn) ->
+    onOkButton: (ev) -> @state.onOk?(this, ev)
+    onCancelButton: (ev) -> @state.onCancel?(this, ev)
+    onButton: (ev, btn) ->
         @selected = btn
-        @_hide() if @state.autoHide
         if btn.eventKey is 'ok'
-            @onOkButton()
+            @onOkButton(ev)
         else
-            @onCancelButton()
+            @onCancelButton(ev)
+        @_hide() if @state.autoHide and ev.defaultPrevented isnt true
 
     componentWillReceiveProps: (nextProps) ->
         @replaceState(nextProps)

        @context.viewport.modalProps.show = true
        @setState(show: true)

    hide: ->
        @_hide()
        @state.onCancel?()

    render: ->
        return null unless @state.show

            button.eventKey ||= (button.key or button.title).toLowerCase()
            <BS.Button key={button.title}
                bsStyle={button.style || 'default'} className={name}
                onClick={_.partial(@onButton, _, button)}>{button.title}</BS.Button>

        cls = _.classnames('lanes-modal', @state.className, @context.uistate?.layout_size)
        Body = @state.body
