強烈要求連登Frontend team正視zoom近scroll錯位嘅問題 - bug已de

4 回覆
8 Like 1 Dislike
2024-04-01 02:53:52
上個post: https://lihkg.com/thread/3645144/page/1

Debug screen recording:
https://streamable.com/zpcgbb

PR detail:
當個menu drawer個background係absolute top/bottom/left/right=0 但又唔係display none的話,
個browser走會用pointer window left嘅距離去scroll下面嘅element,暫時chrome同arc都有事(都係chromium)

解決方法(react):
menu唔show嘅時候display: none
為咗keep返個fade out animation,可以考慮用css keyframe + onAnimationEnd去處理個display state
e.g.
openDrawer = false (initial)
drawerDisplayCss = 'none' (initial)

按下menu按鈕:
openDrawer = true
drawerDisplayCss = 'absolute'

要close menu(on backdrop click):
openDrawer = false -> backdrop fade out + drawer去返左邊 (兩個都可以用css keyframe)


backdrop/drawer嘅onAnimationEnd:
if(openDrawer ==== false) drawerDisplayCss = 'none' 
2024-04-02 00:54:23
2024-04-02 11:08:20
要改用 css keyframe 應該難 d,因為有個 global touch gesture 可以從左至右拉個 menu 出黎。不過我估係而家既 implementation 加個 callback 係 hidden 既時候加個 display: none 應該唔難。
2024-04-02 20:57:44
push
吹水台自選台熱 門最 新手機台時事台政事台World體育台娛樂台動漫台Apps台遊戲台影視台講故台健康台感情台家庭台潮流台美容台上班台財經台房屋台飲食台旅遊台學術台校園台汽車台音樂台創意台硬件台電器台攝影台玩具台寵物台軟件台活動台電訊台直播台站務台黑 洞