summaryrefslogtreecommitdiffstats
path: root/toolkit/content/widgets/timepicker.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/content/widgets/timepicker.js')
-rw-r--r--toolkit/content/widgets/timepicker.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/toolkit/content/widgets/timepicker.js b/toolkit/content/widgets/timepicker.js
index f438e9ec6..544032e9f 100644
--- a/toolkit/content/widgets/timepicker.js
+++ b/toolkit/content/widgets/timepicker.js
@@ -218,6 +218,7 @@ function TimePicker(context) {
},
_attachEventListeners() {
window.addEventListener("message", this);
+ document.addEventListener("mousedown", this);
},
/**
@@ -231,6 +232,12 @@ function TimePicker(context) {
this.handleMessage(event);
break;
}
+ case "mousedown": {
+ // Use preventDefault to keep focus on input boxes
+ event.preventDefault();
+ event.target.setCapture();
+ break;
+ }
}
},