From 5c07c49243181c70c1869997dd81954858d8374a Mon Sep 17 00:00:00 2001 From: James Tsay <65299136+TsayAdobe@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:17:56 -0800 Subject: [PATCH] MWPW-161195 Reload page if going backward (#910) * Reload page if going back forward * Remove comment --- acrobat/blocks/verb-widget/verb-widget.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/acrobat/blocks/verb-widget/verb-widget.js b/acrobat/blocks/verb-widget/verb-widget.js index 5e8204a7..6d559290 100644 --- a/acrobat/blocks/verb-widget/verb-widget.js +++ b/acrobat/blocks/verb-widget/verb-widget.js @@ -345,9 +345,14 @@ export default async function init(element) { handleError(e.detail, true, lanaOptions); verbAnalytics('error', VERB); } + }); - // acrobat:verb-fillsign:error:page_count_missing_from_metadata_api - // acrobat:verb-fillsign:error:403 - // LANA for 403 + window.addEventListener('pageshow', (event) => { + const historyTraversal = event.persisted + || (typeof window.performance !== 'undefined' + && window.performance.getEntriesByType('navigation')[0].type === 'back_forward'); + if (historyTraversal) { + window.location.reload(); + } }); }