some ugly hack to prevent the jump in form height when you input first character
This commit is contained in:
		
							parent
							
								
									5bc7ecdb3b
								
							
						
					
					
						commit
						ce0b551c59
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -240,7 +240,10 @@ const PostStatusForm = {
 | 
				
			||||||
    resize (e) {
 | 
					    resize (e) {
 | 
				
			||||||
      const target = e.target || e
 | 
					      const target = e.target || e
 | 
				
			||||||
      target.style.height = 'auto'
 | 
					      target.style.height = 'auto'
 | 
				
			||||||
      target.style.height = `${target.scrollHeight - 10}px`
 | 
					      const heightPx = target.scrollHeight - 10
 | 
				
			||||||
 | 
					      if (heightPx > 54) {
 | 
				
			||||||
 | 
					        target.style.height = `${target.scrollHeight - 10}px`
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
      if (target.value === '') {
 | 
					      if (target.value === '') {
 | 
				
			||||||
        target.style.height = '16px'
 | 
					        target.style.height = '16px'
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue