@@ -200,21 +200,13 @@ export class AutocompleteTextareaComponent
200200 }
201201 if ( changes . value && ! this . value && this . messageInput ) {
202202 this . messageInput . nativeElement . style . height = 'auto' ;
203- this . chatClientService . chatClient . logger (
204- 'info' ,
205- '[Autocomplete textarea] Value reset, adjusting textarea height to auto'
206- ) ;
207203 this . updateMentionedUsersFromText ( ) ;
208204 } else if (
209205 changes . value &&
210206 this . value &&
211207 this . messageInput &&
212208 this . isViewInited
213209 ) {
214- this . chatClientService . chatClient . logger (
215- 'info' ,
216- '[Autocomplete textarea] Value changed'
217- ) ;
218210 setTimeout ( ( ) => {
219211 if ( this . messageInput . nativeElement . scrollHeight > 0 ) {
220212 this . adjustTextareaHeight ( ) ;
@@ -225,10 +217,6 @@ export class AutocompleteTextareaComponent
225217
226218 ngAfterViewInit ( ) : void {
227219 this . isViewInited = true ;
228- this . chatClientService . chatClient . logger (
229- 'info' ,
230- '[Autocomplete textarea] View inited'
231- ) ;
232220 if ( this . messageInput . nativeElement . scrollHeight > 0 ) {
233221 this . adjustTextareaHeight ( ) ;
234222 }
@@ -263,10 +251,6 @@ export class AutocompleteTextareaComponent
263251
264252 inputChanged ( ) {
265253 this . valueChange . emit ( this . messageInput . nativeElement . value ) ;
266- this . chatClientService . chatClient . logger (
267- 'info' ,
268- '[Autocomplete textarea] Input changed'
269- ) ;
270254 this . adjustTextareaHeight ( ) ;
271255 }
272256
@@ -283,20 +267,8 @@ export class AutocompleteTextareaComponent
283267 }
284268
285269 private adjustTextareaHeight ( ) {
286- const necessaryHeight = `${ this . messageInput . nativeElement . scrollHeight } px` ;
287- if ( this . messageInput . nativeElement . style . height === necessaryHeight ) {
288- this . chatClientService . chatClient . logger (
289- 'info' ,
290- `[Autocomplete textarea] No need to adjust textarea height`
291- ) ;
292- } else {
293- this . chatClientService . chatClient . logger (
294- 'info' ,
295- `[Autocomplete textarea] Adjusting textarea height to ${ necessaryHeight } `
296- ) ;
297- this . messageInput . nativeElement . style . height = '' ;
298- this . messageInput . nativeElement . style . height = necessaryHeight ;
299- }
270+ this . messageInput . nativeElement . style . height = '' ;
271+ this . messageInput . nativeElement . style . height = `${ this . messageInput . nativeElement . scrollHeight } px` ;
300272 }
301273
302274 private transliterate ( s : string ) {
0 commit comments