File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 8
8
font-size : 18px ;
9
9
color : var (--foreground-0 );
10
10
margin-bottom : 20px ;
11
+ transition : 0.05s ;
12
+ pointer-events : all;
13
+ margin-top : 26px ;
11
14
}
12
15
13
16
.search-box : active ,
16
19
border : none;
17
20
}
18
21
22
+ .search-box : disabled {
23
+ height : 0px ;
24
+ padding-top : 0px ;
25
+ padding-bottom : 0px ;
26
+ margin-bottom : 0px ;
27
+ pointer-events : none;
28
+ }
29
+
19
30
::-webkit-input-placeholder {
20
31
/* WebKit, Blink, Edge */
21
32
color : var (--foreground-1 );
36
47
::placeholder {
37
48
/* Most modern browsers support this now. */
38
49
color : var (--foreground-1 );
39
- }
50
+ }
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ const Home = async () => {
25
25
<!-- <span class="new-message-button"></span> --!>
26
26
</p>
27
27
</div>
28
- <h1 class="app-header">Messages</h1>
28
+ <h1 class="app-header" style="margin-bottom: -20px;" >Messages</h1>
29
29
<input tabindex="-1" class="search-box" type="text" onkeyup="SearchContacts()" value="" placeholder=" Search"/>
30
30
</div>
31
31
<div id="homepage-contacts" style="overflow-y: scroll; flex: 1 1 auto;">
Original file line number Diff line number Diff line change @@ -34,6 +34,19 @@ catch {
34
34
} ) )
35
35
}
36
36
37
+ let LastContactsScrollTop = 0 ;
38
+ let ContactsContainer = document . getElementById ( "homepage-contacts" )
39
+ ContactsContainer . addEventListener ( "scroll" , ( event ) => {
40
+ let diff = ContactsContainer . scrollTop - LastContactsScrollTop ;
41
+ if ( diff < 0 ) {
42
+ document . getElementsByClassName ( "search-box" ) [ 0 ] . removeAttribute ( "disabled" )
43
+ }
44
+ else {
45
+ document . getElementsByClassName ( "search-box" ) [ 0 ] . setAttribute ( "disabled" , true )
46
+ }
47
+ LastContactsScrollTop = ContactsContainer . scrollTop
48
+ } )
49
+
37
50
let ContactImgCache = [ ]
38
51
const GetCachedContactImg = ( docid ) => {
39
52
for ( const Elem of ContactImgCache ) {
@@ -877,7 +890,7 @@ const ProcessResponse = async (json) => {
877
890
ApplyReactions ( json )
878
891
879
892
// Scroll to bottom
880
- MessageContainer . scrollTop = MessageContainer . scrollHeight ;
893
+ // MessageContainer.scrollTop = MessageContainer.scrollHeight;
881
894
}
882
895
883
896
const SwapTab = ( TabNum , Intent = "" ) => {
You can’t perform that action at this time.
0 commit comments