зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1315911 - Disable time picker UI by making it pref-off by default; r=mconley
MozReview-Commit-ID: 2kpzN27KzaB --HG-- extra : rebase_source : 9efa47a4037e23636685ec517e8823296337fd2a
This commit is contained in:
Родитель
57478826a0
Коммит
0d26c8b9f2
|
@ -1187,6 +1187,9 @@ pref("dom.forms.color", true);
|
|||
// default, disabled.
|
||||
pref("dom.forms.datetime", false);
|
||||
|
||||
// Enable time picker UI. By default, disabled.
|
||||
pref("dom.forms.datetime.timepicker", false);
|
||||
|
||||
// Support for new @autocomplete values
|
||||
pref("dom.forms.autocomplete.experimental", false);
|
||||
|
||||
|
|
|
@ -1644,7 +1644,10 @@ let DateTimePickerListener = {
|
|||
*/
|
||||
getBoundingContentRect: function(aElement) {
|
||||
return BrowserUtils.getElementBoundingRect(aElement);
|
||||
// return BrowserUtils.getElementBoundingScreenRect(aElement);
|
||||
},
|
||||
|
||||
getTimePickerPref: function() {
|
||||
return Services.prefs.getBoolPref("dom.forms.datetime.timepicker");
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -1672,7 +1675,9 @@ let DateTimePickerListener = {
|
|||
handleEvent: function(aEvent) {
|
||||
switch (aEvent.type) {
|
||||
case "MozOpenDateTimePicker": {
|
||||
if (!(aEvent.originalTarget instanceof content.HTMLInputElement)) {
|
||||
// Time picker is disabled when preffed off
|
||||
if (!(aEvent.originalTarget instanceof content.HTMLInputElement) ||
|
||||
(aEvent.originalTarget.type == "time" && !this.getTimePickerPref())) {
|
||||
return;
|
||||
}
|
||||
this._inputElement = aEvent.originalTarget;
|
||||
|
|
Загрузка…
Ссылка в новой задаче