diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-06 15:53:52 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-07-06 15:53:52 +0200 |
commit | 941e54654eabed0a3568f7fefe424a45aa02eddb (patch) | |
tree | 49aa02b174c428962d99142d8061267bfcd79e69 /toolkit/content/browser-content.js | |
parent | ad9ee72dcd7981bc47b3844a224d69fadfdfd8ef (diff) | |
parent | 0daa12376295d5d796256a116eb2a348a3a9273f (diff) | |
download | UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.gz UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.lz UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.tar.xz UXP-941e54654eabed0a3568f7fefe424a45aa02eddb.zip |
Merge branch 'master' of https://github.com/MoonchildProductions/UXP into _testBranch_test_1
Diffstat (limited to 'toolkit/content/browser-content.js')
-rw-r--r-- | toolkit/content/browser-content.js | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/toolkit/content/browser-content.js b/toolkit/content/browser-content.js index 4ae798fbd..2276f8a0d 100644 --- a/toolkit/content/browser-content.js +++ b/toolkit/content/browser-content.js @@ -594,12 +594,6 @@ var Printing = { contentElement.setAttribute("class", "content"); containerElement.appendChild(contentElement); - // Create style element for content div and import aboutReaderContent.css - let controlContentStyle = content.document.createElement("style"); - controlContentStyle.setAttribute("scoped", ""); - controlContentStyle.textContent = "@import url(\"chrome://global/skin/aboutReaderContent.css\");"; - contentElement.appendChild(controlContentStyle); - // Jam the article's content into content div let readerContent = content.document.createElement("div"); readerContent.setAttribute("id", "moz-reader-content"); @@ -847,6 +841,7 @@ var FindBar = { fakeEvent[k] = event[k]; } } + // sendSyncMessage returns an array of the responses from all listeners let rv = sendSyncMessage("Findbar:Keypress", { fakeEvent: fakeEvent, @@ -1714,6 +1709,14 @@ let DateTimePickerListener = { (aEvent.originalTarget.type == "time" && !this.getTimePickerPref())) { return; } + + if (this._inputElement) { + // This happens when we're trying to open a picker when another picker + // is still open. We ignore this request to let the first picker + // close gracefully. + return; + } + this._inputElement = aEvent.originalTarget; this._inputElement.setDateTimePickerState(true); this.addListeners(); @@ -1728,15 +1731,17 @@ let DateTimePickerListener = { // element's value. value: Object.keys(value).length > 0 ? value : this._inputElement.value, - step: this._inputElement.step, - min: this._inputElement.min, - max: this._inputElement.max, + min: this._inputElement.getMinimum(), + max: this._inputElement.getMaximum(), + step: this._inputElement.getStep(), + stepBase: this._inputElement.getStepBase(), }, }); break; } case "MozUpdateDateTimePicker": { let value = this._inputElement.getDateTimeInputBoxValue(); + value.type = this._inputElement.type; sendAsyncMessage("FormDateTime:UpdatePicker", { value }); break; } |