mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	fix immediately closed attribute detail after clicking e.g. "add label"
This commit is contained in:
		@@ -97,7 +97,7 @@ class ContextMenu {
 | 
				
			|||||||
                    .append($link)
 | 
					                    .append($link)
 | 
				
			||||||
                    // important to use mousedown instead of click since the former does not change focus
 | 
					                    // important to use mousedown instead of click since the former does not change focus
 | 
				
			||||||
                    // (especially important for focused text for spell check)
 | 
					                    // (especially important for focused text for spell check)
 | 
				
			||||||
                    .on('mousedown', (e) => {
 | 
					                    .on('mousedown', e => {
 | 
				
			||||||
                        e.stopPropagation();
 | 
					                        e.stopPropagation();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        this.hide();
 | 
					                        this.hide();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -334,7 +334,7 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget {
 | 
				
			|||||||
        this.$relatedNotesList = this.$relatedNotesContainer.find('.related-notes-list');
 | 
					        this.$relatedNotesList = this.$relatedNotesContainer.find('.related-notes-list');
 | 
				
			||||||
        this.$relatedNotesMoreNotes = this.$relatedNotesContainer.find('.related-notes-more-notes');
 | 
					        this.$relatedNotesMoreNotes = this.$relatedNotesContainer.find('.related-notes-more-notes');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $(window).on('mouseup', e => {
 | 
					        $(window).on('mousedown', e => {
 | 
				
			||||||
            if (!$(e.target).closest(this.$widget[0]).length
 | 
					            if (!$(e.target).closest(this.$widget[0]).length
 | 
				
			||||||
                && !$(e.target).closest(".algolia-autocomplete").length
 | 
					                && !$(e.target).closest(".algolia-autocomplete").length
 | 
				
			||||||
                && !$(e.target).closest("#context-menu-container").length) {
 | 
					                && !$(e.target).closest("#context-menu-container").length) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user