On Thu, 7 May 2026 15:03:42 GMT, Christopher Schnick <[email protected]> wrote:
> While fixing https://bugs.openjdk.org/browse/JDK-8338145, I found the cause > to be the fact that the popup did not have the right size computed before the > first show. That is why the fix calls `sizePopup()` twice. Maybe this issue > is related and somehow eliminates the need to call sizePopup() twice? A good question. There seems to be something wrong in the overall logic (probably pre-existing) in regards to CSS. Can we even applyCss() before the popup is shown? Wouldn't it impact the styles if there exists more complex dependency on the parent window? Another scenario is when the stylesheet changes mid-flight, in one of the animation frames, see https://github.com/andy-goryachev-oracle/Test/blob/main/src/goryachev/bugs/ComboBox_PopupSize_8325564.java L40. The popup padding is not updated if the popup is already shown: <img width="318" height="329" alt="Screenshot 2026-06-01 at 14 56 07" src="https://github.com/user-attachments/assets/50a803b9-e4f8-4e0c-b472-de99bd122e58" /> but if the user hides the popup and then re-opens it, the padding is correct: <img width="239" height="231" alt="Screenshot 2026-06-01 at 14 56 38" src="https://github.com/user-attachments/assets/32f0a715-0e0f-45ad-b6ce-2cafa623f0e7" /> Again, this might be a sign of some deeper problem (or possibly a rare corner case). The fix looks weird, I admit, but at least it works correctly, seemingly without any flicker. I am inclined to call it "good enough". ------------- PR Comment: https://git.openjdk.org/jfx/pull/2052#issuecomment-4596892392
