fix: ensure video items always appear at top of search results#624
Conversation
Previously, .videoItems relied on position:absolute + a 50ms setTimeout margin hack to stay at the top of search results. This caused a race condition when multiple Items components loaded asynchronously — the margin could be applied to the wrong element depending on file I/O completion order across different machines. Fix by separating video-guide results in the render method so they always come first in the DOM, and removing position:absolute from .videoItems to let it flow naturally. This eliminates both the timing-dependent hack and the fragile className-based DOM query. Bug: https://pms.uniontech.com/bug-view-363963.html
|
/forcemerge |
|
This pr force merged! (status: unstable) |
7355074
into
linuxdeepin:release/eagle
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: LiHua000, max-lvs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
2 similar comments
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: LiHua000, max-lvs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: LiHua000, max-lvs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
deepin pr auto review我对这个代码审查如下:
改进建议:
总体来说,这次代码改进是积极的,移除了直接操作DOM的代码,提高了代码的可维护性和性能,同时保持了功能的完整性。 |
Previously, .videoItems relied on position:absolute + a 50ms setTimeout
margin hack to stay at the top of search results. This caused a race
condition when multiple Items components loaded asynchronously — the
margin could be applied to the wrong element depending on file I/O
completion order across different machines.
log: fix bug
Bug:https://pms.uniontech.com/bug-view-363963.html