Commit 0c793e91 authored by Raine Makelainen's avatar Raine Makelainen

Merge branch 'jb36163' into 'master'

[embedlite-components] Treat "date" and "time" input types similarly as "number". Contributes to JB#36163



See merge request !28
parents a48f1fd8 1bafee9c
......@@ -91,6 +91,11 @@ EmbedHelper.prototype = {
this.updateZoomMarginPref();
},
// Similar to HtmlInputElement IsExperimentalMobileType
isExperimentalMobileType: function(type) {
return type === "number" || type === "time" || type === "date";
},
getFocusedInput: function(aBrowser, aOnlyInputElements = false) {
if (!aBrowser)
return null;
......@@ -107,8 +112,10 @@ EmbedHelper.prototype = {
focused = doc.activeElement;
}
if (focused instanceof HTMLInputElement && (focused.mozIsTextField && focused.mozIsTextField(false) || focused.type === "number"))
if (focused instanceof HTMLInputElement && (focused.mozIsTextField && focused.mozIsTextField(false)
|| this.isExperimentalMobileType(focused.type))) {
return { inputElement: focused, isTextField: true };
}
if (aOnlyInputElements)
return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment