diff --git a/chrome/content/zotero/elements/editableText.js b/chrome/content/zotero/elements/editableText.js index 8d3399f7f4..8e07933052 100644 --- a/chrome/content/zotero/elements/editableText.js +++ b/chrome/content/zotero/elements/editableText.js @@ -169,7 +169,9 @@ render() { let autocompleteParams = this.autocomplete; let autocompleteEnabled = !this.multiline && !!autocompleteParams; - if (!this._input || autocompleteEnabled !== (this._input.constructor.name === 'AutocompleteInput')) { + if (!this._input + || (this._input.constructor.name === 'AutocompleteInput') !== autocompleteEnabled + || this._input.tagName !== (this.noWrap ? 'input' : 'textarea')) { let input; if (autocompleteEnabled) { input = document.createElement('input', { is: 'autocomplete-input' }); diff --git a/chrome/content/zotero/elements/itemBox.js b/chrome/content/zotero/elements/itemBox.js index 1aebc0b9ae..5819f6b7d9 100644 --- a/chrome/content/zotero/elements/itemBox.js +++ b/chrome/content/zotero/elements/itemBox.js @@ -1467,13 +1467,15 @@ var fieldID = Zotero.ItemFields.getID(fieldName); } - var isMultiline = Zotero.ItemFields.isMultiline(fieldName) || Zotero.ItemFields.isLong(fieldName); + let isMultiline = Zotero.ItemFields.isMultiline(fieldName); + let isLong = Zotero.ItemFields.isLong(fieldName); + var valueElement = document.createXULElement("editable-text"); valueElement.className = 'value'; if (isMultiline) { valueElement.setAttribute('multiline', true); } - else { + else if (!isLong) { // Usual fields occupy all available space and keep info on one line valueElement.setAttribute("nowrap", true); } @@ -1548,7 +1550,7 @@ else { valueElement.style.textAlign = 'left'; } - if (!fieldName.includes("creator")) { + if (!isLong && !fieldName.includes("creator")) { // autocomplete for creator names is added in addCreatorRow this.addAutocompleteToElement(valueElement); }