File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,10 @@ import {I18n} from "./i18n.js";
173
173
searchBox . parentElement ! . classList . add ( "searching" ) ;
174
174
}
175
175
} ) ;
176
+ const sideContainDiv = document . getElementById ( "sideContainDiv" ) as HTMLElement ;
177
+ searchBox . onclick = ( ) => {
178
+ sideContainDiv . classList . remove ( "hideSearchDiv" ) ;
179
+ } ;
176
180
searchX . onclick = ( ) => {
177
181
if ( searchX . classList . contains ( "svg-plainx" ) ) {
178
182
markdown . txt = [ ] ;
Original file line number Diff line number Diff line change @@ -2845,6 +2845,7 @@ class Localuser {
2845
2845
for ( const elm of htmls ) elm . remove ( ) ;
2846
2846
}
2847
2847
const htmls : HTMLElement [ ] = [ ] ;
2848
+ sideContainDiv . classList . remove ( "hideSearchDiv" ) ;
2848
2849
for ( const message of messages ) {
2849
2850
if ( channel !== message . channel ) {
2850
2851
channel = message . channel ;
@@ -2857,6 +2858,7 @@ class Localuser {
2857
2858
const html = message . buildhtml ( undefined , true ) ;
2858
2859
html . addEventListener ( "click" , async ( ) => {
2859
2860
try {
2861
+ sideContainDiv . classList . add ( "hideSearchDiv" ) ;
2860
2862
await message . channel . focus ( message . id ) ;
2861
2863
} catch ( e ) {
2862
2864
console . error ( e ) ;
Original file line number Diff line number Diff line change @@ -2721,6 +2721,10 @@ fieldset input[type="radio"] {
2721
2721
# sideContainDiv .searchDiv {
2722
2722
right : 0 ;
2723
2723
overflow : auto;
2724
+ transition : transform 0.2s ;
2725
+ }
2726
+ .hideSearchDiv {
2727
+ transform : translate (100% );
2724
2728
}
2725
2729
# page : has (# maintoggle : checked ) # maintoggleicon {
2726
2730
rotate : 180deg ;
You can’t perform that action at this time.
0 commit comments