forked from open-webui/open-webui
		
	fix: feedback area scroll into view
This commit is contained in:
		
							parent
							
								
									d6a0805966
								
							
						
					
					
						commit
						68de49e533
					
				
					 2 changed files with 17 additions and 1 deletions
				
			
		|  | @ -7,6 +7,7 @@ | |||
| 
 | ||||
| 	const dispatch = createEventDispatcher(); | ||||
| 
 | ||||
| 	export let messageId = null; | ||||
| 	export let show = false; | ||||
| 	export let message; | ||||
| 
 | ||||
|  | @ -63,7 +64,10 @@ | |||
| 	}; | ||||
| </script> | ||||
| 
 | ||||
| <div class=" my-2.5 rounded-xl px-4 py-3 border dark:border-gray-850"> | ||||
| <div | ||||
| 	class=" my-2.5 rounded-xl px-4 py-3 border dark:border-gray-850" | ||||
| 	id="message-feedback-{messageId}" | ||||
| > | ||||
| 	<div class="flex justify-between items-center"> | ||||
| 		<div class=" text-sm">{$i18n.t('Tell us more:')}</div> | ||||
| 
 | ||||
|  |  | |||
|  | @ -556,6 +556,12 @@ | |||
| 													on:click={() => { | ||||
| 														rateMessage(message.id, 1); | ||||
| 														showRateComment = true; | ||||
| 
 | ||||
| 														window.setTimeout(() => { | ||||
| 															document | ||||
| 																.getElementById(`message-feedback-${message.id}`) | ||||
| 																?.scrollIntoView(); | ||||
| 														}, 0); | ||||
| 													}} | ||||
| 												> | ||||
| 													<svg | ||||
|  | @ -585,6 +591,11 @@ | |||
| 													on:click={() => { | ||||
| 														rateMessage(message.id, -1); | ||||
| 														showRateComment = true; | ||||
| 														window.setTimeout(() => { | ||||
| 															document | ||||
| 																.getElementById(`message-feedback-${message.id}`) | ||||
| 																?.scrollIntoView(); | ||||
| 														}, 0); | ||||
| 													}} | ||||
| 												> | ||||
| 													<svg | ||||
|  | @ -844,6 +855,7 @@ | |||
| 
 | ||||
| 								{#if showRateComment} | ||||
| 									<RateComment | ||||
| 										messageId={message.id} | ||||
| 										bind:show={showRateComment} | ||||
| 										bind:message | ||||
| 										on:submit={() => { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy J. Baek
						Timothy J. Baek