File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2576,12 +2576,27 @@ let userDataFunction = async user => {
25762576 } ) ;
25772577 shadow . appendChild ( div ) ;
25782578
2579- if ( isSticky ( el ) ) {
2579+ if ( isSticky ( el ) && ! el . closest ( '#search-results' ) ) {
25802580 el . after ( userPreview ) ;
25812581 } else {
25822582 let rects = el . getBoundingClientRect ( ) ;
2583- userPreview . style . top = `${ rects . top + window . scrollY + 20 } px` ;
2584- userPreview . style . left = `${ rects . left + window . scrollX } px` ;
2583+ let topValue ;
2584+
2585+ if ( el . closest ( '#search-results' ) ) {
2586+ let searchInput = document . getElementById ( 'search-input' ) ;
2587+ let searchRect = searchInput . getBoundingClientRect ( ) ;
2588+
2589+ topValue = searchRect . top + window . scrollY + 40 ;
2590+
2591+ userPreview . style . left = `${ rects . left + window . scrollX - 320 } px` ;
2592+ userPreview . style . zIndex = "10000" ;
2593+ } else {
2594+ topValue = rects . top + window . screenY + 60 ;
2595+ userPreview . style . left = `${ rects . left + window . scrollX } px` ;
2596+ }
2597+
2598+ userPreview . style . top = `${ topValue } px` ;
2599+
25852600 let closestTweet = el . closest ( '.tweet' ) ;
25862601 if ( closestTweet ) {
25872602 let linkColor = closestTweet . style . getPropertyValue ( '--link-color' ) ;
You can’t perform that action at this time.
0 commit comments