Bug 1390794 - Use 'norolluponanchor' to avoid closing the picker when the anchored input box is clicked

This commit is contained in:
janekptacijarabaci 2018-03-31 06:58:05 +02:00 committed by Roy Tam
commit 1cbd27ae55
2 changed files with 4 additions and 11 deletions

View file

@ -155,13 +155,15 @@
level="parent"
overflowpadding="30" />
<!-- for date/time picker. consumeoutsideclicks is set to never, so that
clicks on the anchored input box are never consumed. -->
<panel id="DateTimePickerPanel"
type="arrow"
hidden="true"
orient="vertical"
noautofocus="true"
noautohide="true"
consumeoutsideclicks="false"
norolluponanchor="true"
consumeoutsideclicks="never"
level="parent"
tabspecific="true">
<iframe id="dateTimePopupFrame"/>

View file

@ -1076,9 +1076,6 @@
// 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 });
]]>
</constructor>
@ -1093,8 +1090,6 @@
});
this.mInputElement.removeEventListener("click", this,
{ mozSystemGroup: true });
this.mInputElement.removeEventListener("blur", this,
{ mozSystemGroup: true });
this.mInputElement = null;
]]>
@ -1350,10 +1345,6 @@
this.log("onBlur originalTarget: " + aEvent.originalTarget +
" target: " + aEvent.target);
if (aEvent.target == this.mInputElement && this.mIsPickerOpen) {
this.mInputElement.closeDateTimePicker();
}
let target = aEvent.originalTarget;
target.setAttribute("typeBuffer", "");
this.setInputValueFromFields();