@wernfried/daterangepicker 5.3.0 → 5.3.1

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.
@@ -539,16 +539,16 @@ class DateRangePicker {
539
539
  this.addListener(".ranges", "mouseleave", "li", this.leaveRange.bind(this));
540
540
  this.addListener(".drp-buttons", "click", "button.applyBtn", this.clickApply.bind(this));
541
541
  this.addListener(".drp-buttons", "click", "button.cancelBtn", this.clickCancel.bind(this));
542
- if (this.showOnClick) {
543
- if (this.element.matches("input") || this.element.matches("button")) {
542
+ if (this.element.matches("input") || this.element.matches("button")) {
543
+ if (this.showOnClick) {
544
544
  this.element.addEventListener("click", this.#showProxy);
545
545
  this.element.addEventListener("focus", this.#showProxy);
546
- this.element.addEventListener("keyup", this.#elementChangedProxy);
547
- this.element.addEventListener("keydown", this.#keydownProxy);
548
- } else {
549
- this.element.addEventListener("click", this.#toggleProxy);
550
- this.element.addEventListener("keydown", this.#toggleProxy);
551
546
  }
547
+ this.element.addEventListener("keyup", this.#elementChangedProxy);
548
+ this.element.addEventListener("keydown", this.#keydownProxy);
549
+ } else if (this.showOnClick) {
550
+ this.element.addEventListener("click", this.#toggleProxy);
551
+ this.element.addEventListener("keydown", this.#toggleProxy);
552
552
  }
553
553
  if (this.button)
554
554
  this.button.addEventListener("click", this.#showProxy);