bootbox icon indicating copy to clipboard operation
bootbox copied to clipboard

Close button does not invoke callback

Open algirdask opened this issue 13 years ago • 6 comments

Callback should be called for escape, cancel and close buttons. Now it only works with escape/cancel.

It could use escape button callback.

var index = -1;
if (typeof options['onEscape'] == 'function') {
    index = handlers.length;
    callbacks[index] = options['onEscape'];
    handlers[index] = options['onEscape'];
}

And create close button:

closeButton = "<a" + 
                ((index  > 0) ? " data-handler='"+index +"' " : " ") +
                "href='"+_defaultHref+"' class='close'>&times;</a>";

algirdask avatar Feb 16 '13 21:02 algirdask

You're right - will be fixed in 3.1.0. Thanks for the report :)

makeusabrew avatar Feb 17 '13 15:02 makeusabrew

Thank you. Bootbox is awesome :)

algirdask avatar Feb 17 '13 15:02 algirdask

Sorry, just quickly rolled out 3.1.0 and forgot to implement this - will be done as the very next fix :)

makeusabrew avatar Feb 18 '13 21:02 makeusabrew

Ok :D

algirdask avatar Feb 18 '13 21:02 algirdask

Fixed in 3.2.0 :)

makeusabrew avatar Feb 19 '13 16:02 makeusabrew

Thanks :+1:

algirdask avatar Feb 21 '13 19:02 algirdask