mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 13:39:01 +01:00 
			
		
		
		
	fix search in "view source", closes #3929
This commit is contained in:
		
							parent
							
								
									38781d33ac
								
							
						
					
					
						commit
						8a6002c6be
					
				@ -222,6 +222,10 @@ class NoteContext extends Component {
 | 
				
			|||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (this.viewScope.viewMode === 'source') {
 | 
				
			||||||
 | 
					            return true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const blob = await this.note.getBlob();
 | 
					        const blob = await this.note.getBlob();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const sizeLimit = this.note.type === 'text'
 | 
					        const sizeLimit = this.note.type === 'text'
 | 
				
			||||||
 | 
				
			|||||||
@ -5,7 +5,9 @@ import protectedSessionHolder from "../../services/protected_session_holder.js";
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
export default class EditButton extends OnClickButtonWidget {
 | 
					export default class EditButton extends OnClickButtonWidget {
 | 
				
			||||||
    isEnabled() {
 | 
					    isEnabled() {
 | 
				
			||||||
        return super.isEnabled() && this.note;
 | 
					        return super.isEnabled()
 | 
				
			||||||
 | 
					            && this.note
 | 
				
			||||||
 | 
					            && this.noteContext.viewScope.viewMode === 'default';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    constructor() {
 | 
					    constructor() {
 | 
				
			||||||
 | 
				
			|||||||
@ -69,7 +69,8 @@ export default class TocWidget extends RightPanelWidget {
 | 
				
			|||||||
    isEnabled() {
 | 
					    isEnabled() {
 | 
				
			||||||
        return super.isEnabled()
 | 
					        return super.isEnabled()
 | 
				
			||||||
            && this.note.type === 'text'
 | 
					            && this.note.type === 'text'
 | 
				
			||||||
            && !this.noteContext.viewScope.tocTemporarilyHidden;
 | 
					            && !this.noteContext.viewScope.tocTemporarilyHidden
 | 
				
			||||||
 | 
					            && this.noteContext.viewScope.viewMode === 'default';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async doRenderBody() {
 | 
					    async doRenderBody() {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user