mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 02:39:03 -04:00 
			
		
		
		
	fix(web): allow copying text in photo viewer (#9705)
* fix(web): allow copying text in photo viewer * use default browser copy * revert changes * fix lint
This commit is contained in:
		
							parent
							
								
									69b5eb005f
								
							
						
					
					
						commit
						b3b258f32f
					
				| @ -120,10 +120,11 @@ | ||||
|     forceLoadOriginal = state.currentZoom > 1 && isWebCompatibleImage(asset) ? true : false; | ||||
|   }); | ||||
| 
 | ||||
|   const onCopyShortcut = () => { | ||||
|   const onCopyShortcut = (event: KeyboardEvent) => { | ||||
|     if (window.getSelection()?.type === 'Range') { | ||||
|       return; | ||||
|     } | ||||
|     event.preventDefault(); | ||||
|     handlePromiseError(doCopy()); | ||||
|   }; | ||||
| </script> | ||||
| @ -132,8 +133,8 @@ | ||||
|   on:copyImage={doCopy} | ||||
|   on:zoomImage={doZoomImage} | ||||
|   use:shortcuts={[ | ||||
|     { shortcut: { key: 'c', ctrl: true }, onShortcut: onCopyShortcut }, | ||||
|     { shortcut: { key: 'c', meta: true }, onShortcut: onCopyShortcut }, | ||||
|     { shortcut: { key: 'c', ctrl: true }, onShortcut: onCopyShortcut, preventDefault: false }, | ||||
|     { shortcut: { key: 'c', meta: true }, onShortcut: onCopyShortcut, preventDefault: false }, | ||||
|   ]} | ||||
| /> | ||||
| {#if imageError} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user