Bug 205447

Summary: Div inside a button, which is a flex item, doesn't get the proper height and overflows
Product: WebKit Reporter: jimousse <jim.castex>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Minor CC: ahmad.saleem792, karlcow, ntim, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: Mac   
OS: macOS 10.15   
Attachments:
Description Flags
Div inside the button overflowing none

jimousse
Reported 2019-12-19 06:04:23 PST
Created attachment 386097 [details] Div inside the button overflowing I have the following code (see below): https://jsfiddle.net/jimousse/u25txw4d/30/ grandchild2 is overflowing from the button. I suspect it is getting its height from "parent". Not sure if this is a flex bug. But I suspect that the presence of the button prevents the div from seeing its parent layout. I tried the jsfiddle in Chrome and Firefox and grandchild2 gets, as I would expect, the height of the button. ------------------------------------- <div class="parent"> <div class="child1"> child 1 </div> <div class="child2"> <button class="mybutton"> <div class="grandchild2"> I'm a score </div> </button> </div> </div> .parent { height: 150px; display: flex; flex-direction: column; background: salmon; border: 2px solid black; } .child1 { background: red; } .child2 { background: grey; height: 100%; display: flex; } .grandchild2 { height: 100%; background: pink; border: 2px solid blue; } .mybutton { height: 100%; width: 100%; background: purple; }
Attachments
Div inside the button overflowing (775.47 KB, image/png)
2019-12-19 06:04 PST, jimousse
no flags
Radar WebKit Bug Importer
Comment 1 2019-12-20 10:41:52 PST
Ahmad Saleem
Comment 2 2023-02-20 15:04:55 PST
I am not able to reproduce this overflow using Inspector in the attached JSFiddle in Safari 16.3 and STP 163. Appreciate if someone else can confirm so we can mark this as "RESOLVED CONFIGURATION CHANGED". Thanks!
zalan
Comment 3 2023-02-22 09:41:12 PST
Looks good to me. Thank you!
Note You need to log in before you can comment on or make changes to this bug.