diff --git a/blocks/identity-block/components/login/index.jsx b/blocks/identity-block/components/login/index.jsx index 3e0cbcd30..c9eb31f26 100644 --- a/blocks/identity-block/components/login/index.jsx +++ b/blocks/identity-block/components/login/index.jsx @@ -62,7 +62,10 @@ const useLogin = ({ if (isOIDC) { loginByOIDC(); } else { - window.location = redirectQueryParam || validatedLoggedInPageLoc; + const curentUrl = new URL(window.location); + const redirectUrl = redirectQueryParam || validatedLoggedInPageLoc; + // added search to handle editing in PB. Search appends the website query params. + window.location = `${redirectUrl}${curentUrl.search}` } } }; diff --git a/blocks/identity-block/components/login/index.test.jsx b/blocks/identity-block/components/login/index.test.jsx index 55e5d5066..71d17725f 100644 --- a/blocks/identity-block/components/login/index.test.jsx +++ b/blocks/identity-block/components/login/index.test.jsx @@ -67,15 +67,15 @@ describe("useLogin()", () => { expect(window.location).toBe("/new-account/"); }); - it("uses document referrer", async () => { - const referrerURL = "http://referrer.com"; + it.only("uses document referrer", async () => { + const referrerURL = "http://referrer.com/article/1234"; Object.defineProperty(document, "referrer", { value: referrerURL, configurable: true, }); await render(); fireEvent.click(screen.getByRole("button")); - expect(window.location).toBe(referrerURL); + expect(window.location).toBe("/article/1234"); delete document.referrer; }); diff --git a/blocks/subscriptions-block/_index.scss b/blocks/subscriptions-block/_index.scss index 6c2b55527..f58a46ee1 100644 --- a/blocks/subscriptions-block/_index.scss +++ b/blocks/subscriptions-block/_index.scss @@ -284,6 +284,6 @@ @media (min-width: 320px) and (max-width: 480px) { .b-paywall__overlay { - top: initial; + inset-block-start: initial; } } \ No newline at end of file