Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In a window, when its size is between whether or not the scrollbar is visible, the style's width determination loops endlessly and the display is too violent. #9076

Closed
tamaina opened this issue Aug 30, 2022 · 13 comments · Fixed by #9232
Labels
🐛Bug Unexpected behavior packages/frontend Client side specific issue/PR

Comments

@tamaina
Copy link
Member

tamaina commented Aug 30, 2022

💡 Summary

ウィンドウで、そのサイズがスクロールバーが表示されるかどうかの間になっているとき、スタイルの幅の判定が無限ループして表示が荒ぶる

p1.a9z.dev.2022-08-30.22-36-46.mp4

🥰 Expected Behavior

表示が固定される

🤬 Actual Behavior

表示が荒ぶる

📌 Environment

Misskey version: Misskey v12.118.1
Your OS: Windows 11
Your browser: Microsoft Edge バージョン 104.0.1293.70 (公式ビルド) (64 ビット)

@tamaina tamaina added the 🐛Bug Unexpected behavior label Aug 30, 2022
@syuilo syuilo added the packages/frontend Client side specific issue/PR label Aug 30, 2022
@syuilo
Copy link
Member

syuilo commented Aug 30, 2022

サイズ判定の際にスクロールバーの幅を足せば解決

@tamaina
Copy link
Member Author

tamaina commented Nov 26, 2022

これいい加減解決しなきゃな

@tamaina
Copy link
Member Author

tamaina commented Nov 26, 2022

一番めんどくさいくないのはoverflow-y: scrollにしてスクロールバーを常に表示させること

@tamaina
Copy link
Member Author

tamaina commented Nov 26, 2022

サイズ判定の際に

うーん、普通のflexboxでも荒ぶったりするんでなぁ

@tamaina
Copy link
Member Author

tamaina commented Nov 26, 2022

2022-11-26.19.33.36.mov

と思ったけどこれflexboxが原因じゃない?

どこでどういうサイズ判定が働いているのかわかってない

@tamaina
Copy link
Member Author

tamaina commented Nov 26, 2022

<div ref="root" :class="$style.root" :style="{ padding: margin + 'px' }">

ここら辺かな

@tamaina
Copy link
Member Author

tamaina commented Nov 26, 2022

paddingの指定

@tamaina
Copy link
Member Author

tamaina commented Nov 26, 2022

clientWidthにすればいいかな?

@Trif4
Copy link

Trif4 commented Nov 26, 2022

I noticed a similar issue when sending chat messages sometimes on desktop, however, I wasn't able to figure out the reproduction steps.

But it seemed to happen when the chat composer box was above the bottom of the screen. If I scrolled up, it would resolve it.

I don't know if it's related to this, but I thought I'd mention it in case.

@tamaina
Copy link
Member Author

tamaina commented Nov 26, 2022

再現性については、あるサイズにウィンドウを狭めると必ず発生します

clientWidthにすればいいかな?

逆では(offsetWidthの方がスクロールバーを含んでいる)

@tamaina
Copy link
Member Author

tamaina commented Nov 26, 2022

ResizeObserverの反復実行にリミットをつけた方が良さそうだな

@acid-chicken
Copy link
Member

/* iOSが対応していない

これ本当?

@tamaina
Copy link
Member Author

tamaina commented Nov 26, 2022

これ本当?

Safari 15.4から対応なので妥当なコメント

https://caniuse.com/mdn-api_resizeobserverentry_borderboxsize

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Unexpected behavior packages/frontend Client side specific issue/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants