gd-bs 6.9.12 → 6.9.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82,12 +82,12 @@ var _Carousel = /** @class */ (function (_super) {
82
82
  // Add a keydown event
83
83
  el.addEventListener("keydown", function (ev) {
84
84
  // See if the left arrow was pressed
85
- if (ev.code == "37") {
85
+ if (ev.key == "ArrowLeft" || ev.keyCode == 37) {
86
86
  // Move to the previous slide
87
87
  _this.previous();
88
88
  }
89
89
  // Else, see if the right arrow was pressed
90
- else if (ev.code == "39") {
90
+ else if (ev.key == "ArrowRight" || ev.keyCode == 39) {
91
91
  // Move tot he next slide
92
92
  _this.next();
93
93
  }
@@ -201,7 +201,7 @@ var _Modal = /** @class */ (function (_super) {
201
201
  // Add a click event
202
202
  this.el.addEventListener("keydown", function (ev) {
203
203
  // See if the escape key was clicked and the modal is visible
204
- if (ev.code === "27" && _this.isVisible) {
204
+ if ((ev.key === "Escape" || ev.keyCode == 27) && _this.isVisible) {
205
205
  // Toggle the modal
206
206
  _this.toggle();
207
207
  }
@@ -127,7 +127,7 @@ var _Navbar = /** @class */ (function (_super) {
127
127
  // Set a keydown event to catch the "Enter" key being pressed
128
128
  searchbox.addEventListener("keydown", function (ev) {
129
129
  // See if the "Enter" key was pressed
130
- if (ev.code == "13") {
130
+ if (ev.key == "Enter") {
131
131
  // Disable the postback
132
132
  ev.preventDefault();
133
133
  // See if there is a search event
@@ -203,7 +203,7 @@ var _Offcanvas = /** @class */ (function (_super) {
203
203
  // Add a click event
204
204
  this.el.addEventListener("keydown", function (ev) {
205
205
  // See if the escape key was clicked and the modal is visible
206
- if (ev.code === "27" && _this.isVisible) {
206
+ if ((ev.key === "Escape" || ev.keyCode == 27) && _this.isVisible) {
207
207
  // Toggle the modal
208
208
  _this.toggle();
209
209
  }