summaryrefslogtreecommitdiffstats
path: root/toolkit/content/widgets/timepicker.js
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-02-14 13:38:47 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-02-14 13:38:47 +0100
commitc87dbe6922ec79f988744f5aab0cde1a166292e6 (patch)
tree97480be1bafd7f5c294af3e00fb8e73325785d6d /toolkit/content/widgets/timepicker.js
parent260e399a1ff7756cda9b6320a801f1198b27604a (diff)
downloadUXP-c87dbe6922ec79f988744f5aab0cde1a166292e6.tar
UXP-c87dbe6922ec79f988744f5aab0cde1a166292e6.tar.gz
UXP-c87dbe6922ec79f988744f5aab0cde1a166292e6.tar.lz
UXP-c87dbe6922ec79f988744f5aab0cde1a166292e6.tar.xz
UXP-c87dbe6922ec79f988744f5aab0cde1a166292e6.zip
Bug 1325922: [DateTimePicker] Add arrows svg file and style month-year button for date picker
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;
+ }
}
},