From f677d87d98f1e482ee03cd7264b13ca97161d5a7 Mon Sep 17 00:00:00 2001 From: Dorian Merz <merz@ub.uni-leipzig.de> Date: Wed, 2 Oct 2019 14:23:03 +0200 Subject: [PATCH] refs #15956 [fid] fix in lightbox_form_cache.js * adds textareas to cached input elements --- themes/finc/js/lightbox_form_cache.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/finc/js/lightbox_form_cache.js b/themes/finc/js/lightbox_form_cache.js index e9600633912..a7ab0d90caa 100644 --- a/themes/finc/js/lightbox_form_cache.js +++ b/themes/finc/js/lightbox_form_cache.js @@ -26,7 +26,8 @@ document.addEventListener('DOMContentLoaded', function () { const cacheKeyBase = Array.from(form.attributes).map(attr => attr.value); const cacheKey = cacheKeyPrefix + btoa(cacheKeyBase.join()); - const inputs = Array.from(form.querySelectorAll('input:not([type=password])')); + const inputs = Array.from(form.querySelectorAll('input:not([type=password])')) + .concat(Array.from(form.querySelectorAll('textarea'))); JSON.parse(cache.getItem(cacheKey) || '[]').forEach(function (value, index) { inputs[index].value = value; }); -- GitLab