Skip to content

Commit

Permalink
Revert "Merge pull request bootboxjs#319 from falexandrou/add-keyboar…
Browse files Browse the repository at this point in the history
…d-option"

This reverts commit b533d37, reversing
changes made to 1d16c1b.
  • Loading branch information
makeusabrew committed Jan 9, 2015
1 parent 71670ea commit 4c9f78d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 46 deletions.
4 changes: 1 addition & 3 deletions bootbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@
animate: true,
// additional class string applied to the top level dialog
className: null,
// whether or not to enable keyboard binding
keyboard: false,
// whether or not to include a close button
closeButton: true,
// show the dialog immediately by default
Expand Down Expand Up @@ -727,7 +725,7 @@

dialog.modal({
backdrop: options.backdrop,
keyboard: options.keyboard || false,
keyboard: false,
show: false
});

Expand Down
43 changes: 0 additions & 43 deletions tests/defaults.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,49 +52,6 @@ describe("bootbox.setDefaults", function() {
});
});

describe("keyboard", function () {
var e = $.Event("keyup");
e.keyCode = e.which = 27;

describe("when set to true", function () {
beforeEach(function () {
bootbox.setDefaults({
animate: false,
keyboard: true
});

this.dialog = bootbox.dialog({
message: "test"
});

this.dialog.trigger(e);
});

it("removes the modal-open class from body", function () {
expect($("body").hasClass("modal-open")).to.be.false;
});
});

describe("when set to false", function () {
beforeEach(function () {
bootbox.setDefaults({
animate: false,
keyboard: false
});

this.dialog = bootbox.dialog({
message: "test"
});

this.dialog.trigger(e);
});

it("doesn't remove the modal-open class from body", function () {
expect($("body").hasClass("modal-open")).to.be.true;
});
});
});

describe("className", function() {
describe("when passed as a string", function() {
beforeEach(function() {
Expand Down

0 comments on commit 4c9f78d

Please sign in to comment.