mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 17:31:47 +09:00
Bug 1371111 - Open picker when input element's padding area is clicked
+ Bug 1341029: https://bugzilla.mozilla.org/show_bug.cgi?id=1341029 (partially - partially - fix typo in removeEventListener): https://hg.mozilla.org/mozilla-central/diff/6055065a2ed5/toolkit/content/widgets/datetimebox.xml + Bug 1410292: https://bugzilla.mozilla.org/show_bug.cgi?id=1410292
This commit is contained in:
parent
39b09ae6d7
commit
758ef612dc
1 changed files with 14 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue