summaryrefslogtreecommitdiff
path: root/toolkit/content
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/content')
-rw-r--r--toolkit/content/widgets/datetimebox.xml23
1 files changed, 14 insertions, 9 deletions
diff --git a/toolkit/content/widgets/datetimebox.xml b/toolkit/content/widgets/datetimebox.xml
index c276265a3d..c45124ef74 100644
--- a/toolkit/content/widgets/datetimebox.xml
+++ b/toolkit/content/widgets/datetimebox.xml
@@ -1072,6 +1072,10 @@
capture: true,
mozSystemGroup: true
});
+ // This is to open the picker when input element is clicked (this
+ // includes padding area).
+ this.mInputElement.addEventListener("click", this,
+ { mozSystemGroup: true });
// This is to close the picker when input element blurs.
this.mInputElement.addEventListener("blur", this,
{ mozSystemGroup: true });
@@ -1080,22 +1084,26 @@
<destructor>
<![CDATA[
- this.mInputElement = null;
-
this.EVENTS.forEach((eventName) => {
this.removeEventListener(eventName, this, { mozSystemGroup: true });
});
- this.removeEventListener("keypress", onKeyPress, {
+ this.removeEventListener("keypress", this, {
capture: true,
mozSystemGroup: true
});
+ this.mInputElement.removeEventListener("click", this,
+ { mozSystemGroup: true });
+ this.mInputElement.removeEventListener("blur", this,
+ { mozSystemGroup: true });
+
+ this.mInputElement = null;
]]>
</destructor>
<property name="EVENTS" readonly="true">
<getter>
<![CDATA[
- return ["click", "focus", "blur", "copy", "cut", "paste", "mousedown"];
+ return ["focus", "blur", "copy", "cut", "paste", "mousedown"];
]]>
</getter>
</property>
@@ -1413,12 +1421,9 @@
<parameter name="aEvent"/>
<body>
<![CDATA[
- this.log("onClick originalTarget: " + aEvent.originalTarget);
+ this.log("onClick originalTarget: " + aEvent.originalTarget +
+ " target: " + aEvent.target);
- // XXX: .originalTarget is not expected.
- // When clicking on one of the inner text boxes, the .originalTarget is
- // a HTMLDivElement and when clicking on the reset button, it's a
- // HTMLButtonElement.
if (aEvent.defaultPrevented || this.isDisabled() || this.isReadonly()) {
return;
}