forked from open-webui/open-webui
		
	enhancement: disable submit via enter on mobile
This commit is contained in:
		
							parent
							
								
									e71ef42155
								
							
						
					
					
						commit
						f1d2340861
					
				
					 1 changed files with 7 additions and 6 deletions
				
			
		|  | @ -689,12 +689,13 @@ | ||||||
| 								: $i18n.t('Send a Message')} | 								: $i18n.t('Send a Message')} | ||||||
| 							bind:value={prompt} | 							bind:value={prompt} | ||||||
| 							on:keypress={(e) => { | 							on:keypress={(e) => { | ||||||
| 								if (e.keyCode == 13 && !e.shiftKey) { | 								if (window.innerWidth > 1024) { | ||||||
| 									e.preventDefault(); | 									if (e.keyCode == 13 && !e.shiftKey) { | ||||||
| 								} | 										e.preventDefault(); | ||||||
| 								if (prompt !== '' && e.keyCode == 13 && !e.shiftKey) { | 									} | ||||||
| 									// TODO: Only if screensize > xl | 									if (prompt !== '' && e.keyCode == 13 && !e.shiftKey) { | ||||||
| 									submitPrompt(prompt, user); | 										submitPrompt(prompt, user); | ||||||
|  | 									} | ||||||
| 								} | 								} | ||||||
| 							}} | 							}} | ||||||
| 							on:keydown={async (e) => { | 							on:keydown={async (e) => { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek