Bug 232530

Summary: Back button can break absolutely positioned elements
Product: WebKit Reporter: mic.gallego
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 15   
Hardware: All   
OS: Unspecified   
Attachments:
Description Flags
Correct result (before) and incorrect result after hitting back button none

Description mic.gallego 2021-10-30 03:42:55 PDT
Created attachment 442908 [details]
Correct result (before) and incorrect result after hitting back button

Hi,

When using the back button of the browser, I am experiencing some absolutely positioned elements that are defying any positioning logic.

To reproduce the issue follow those steps:

1. Go to https://focal-theme-ivory.myshopify.com/products/aubreya-8072-maxi-dress and add the product to the cart.
2. Once added, open the dedicated cart page by following this URL: https://focal-theme-ivory.myshopify.com/cart
3. At this stage, the icon on the "Checkout" button is properly positioned. Click on the "Checkout" button and wait to be redirected to the checkout.
4. Then, hit the back button, and the icon is becoming positioned incorrectly.

The markup is exactly the same, and the icon that is positioned absolutely should be positioned according to the relative parent, but after hitting the back button it is not.
Comment 1 Simon Fraser (smfr) 2021-10-30 10:23:42 PDT
I can reproduce. It's a position:absolute <span> inside flex.
Comment 2 Radar WebKit Bug Importer 2021-11-06 03:43:13 PDT
<rdar://problem/85099235>