mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	fix for dialog's focus stealing
This commit is contained in:
		
							parent
							
								
									d41c9349b8
								
							
						
					
					
						commit
						465c9e56eb
					
				| @ -166,7 +166,13 @@ function handleEncryption(requireEncryption, modal, callback) { | |||||||
| 
 | 
 | ||||||
|         $("#encryptionPasswordDialog").dialog({ |         $("#encryptionPasswordDialog").dialog({ | ||||||
|             modal: modal, |             modal: modal, | ||||||
|             width: 400 |             width: 400, | ||||||
|  |             open: function() { | ||||||
|  |                 if (!modal) { | ||||||
|  |                     // dialog steals focus for itself, which is not what we want for non-modal (viewing)
 | ||||||
|  |                     getNodeByKey(globalNote.detail.note_id).setFocus(); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner