Correctly auto-size textarea in firefox.
This commit is contained in:
		
							parent
							
								
									8841cfa859
								
							
						
					
					
						commit
						9b50517c38
					
				| 
						 | 
					@ -573,9 +573,9 @@
 | 
				
			||||||
    if (event.target === null) return
 | 
					    if (event.target === null) return
 | 
				
			||||||
    autoGrowInput(event.target as HTMLTextAreaElement)
 | 
					    autoGrowInput(event.target as HTMLTextAreaElement)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
  const autoGrowInput = (el: HTMLTextAreaElement) => {
 | 
					  const autoGrowInput = (el: HTMLTextAreaElement) => {
 | 
				
			||||||
    el.style.height = 'auto'
 | 
					    el.style.height = '38px'; // don't use "auto" here.  Firefox will over-size.
 | 
				
			||||||
    el.style.height = el.scrollHeight + 'px'
 | 
					    el.style.height = el.scrollHeight + 'px'
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -980,4 +980,7 @@
 | 
				
			||||||
  .running-totals {
 | 
					  .running-totals {
 | 
				
			||||||
    opacity: 0.5;
 | 
					    opacity: 0.5;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  .chat-input {
 | 
				
			||||||
 | 
					    /* padding:0; */
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue