Skip to content
Permalink
Browse files

Dialog: Changed beforeclose option to beforeClose. Fixes #4669 - Dial…

…og: beforeclose option should be beforeClose.
  • Loading branch information
scottgonzalez committed Jul 11, 2009
1 parent 1a03453 commit a716261ab68536f3b22e994137c8b35b5a15a71b
Showing with 5 additions and 5 deletions.
  1. +4 −4 tests/unit/dialog/dialog_events.js
  2. +1 −1 ui/ui.dialog.js
@@ -186,20 +186,20 @@ test("close", function() {
el.remove();
});

test("beforeclose", function() {
test("beforeClose", function() {
expect(9);

el = $('<div></div>').dialog({
beforeclose: function(ev, ui) {
ok(true, '.dialog("close") fires beforeclose callback');
beforeClose: function(ev, ui) {
ok(true, '.dialog("close") fires beforeClose callback');
equals(this, el[0], "context of callback");
equals(ev.type, 'dialogbeforeclose', 'event type in callback');
same(ui, {}, 'ui hash in callback');
return false;
}
});
el.dialog('close');
isOpen('beforeclose callback should prevent dialog from closing');
isOpen('beforeClose callback should prevent dialog from closing');
el.remove();

el = $('<div></div>').dialog().bind('dialogbeforeclose', function(ev, ui) {
@@ -158,7 +158,7 @@ $.widget("ui.dialog", {
close: function(event) {
var self = this;

if (false === self._trigger('beforeclose', event)) {
if (false === self._trigger('beforeClose', event)) {
return;
}

0 comments on commit a716261

Please sign in to comment.
You can’t perform that action at this time.