mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	fix(mobile): fix offset of the formatting bar
This commit is contained in:
		| @@ -180,7 +180,6 @@ export default class MobileLayout { | |||||||
|                             .child(new NoteListWidget()) |                             .child(new NoteListWidget()) | ||||||
|                             .child(new FilePropertiesWidget().css('font-size','smaller')) |                             .child(new FilePropertiesWidget().css('font-size','smaller')) | ||||||
|                     ) |                     ) | ||||||
|                     .child(new ClassicEditorToolbar()) |  | ||||||
|                 ) |                 ) | ||||||
|                 .child(new ProtectedSessionPasswordDialog()) |                 .child(new ProtectedSessionPasswordDialog()) | ||||||
|                 .child(new ConfirmDialog()) |                 .child(new ConfirmDialog()) | ||||||
| @@ -195,6 +194,7 @@ export default class MobileLayout { | |||||||
|                     .child(new LauncherContainer(true)) |                     .child(new LauncherContainer(true)) | ||||||
|                     .child(new GlobalMenuWidget(true)) |                     .child(new GlobalMenuWidget(true)) | ||||||
|                     .id("launcher-pane"))) |                     .id("launcher-pane"))) | ||||||
|  |             .child(new ClassicEditorToolbar()) | ||||||
|             .child(new AboutDialog()) |             .child(new AboutDialog()) | ||||||
|             .child(new HelpDialog()) |             .child(new HelpDialog()) | ||||||
|             .child(new JumpToNoteDialog()) |             .child(new JumpToNoteDialog()) | ||||||
|   | |||||||
| @@ -34,6 +34,7 @@ const TPL = `\ | |||||||
|         right: 0; |         right: 0; | ||||||
|         overflow-x: auto; |         overflow-x: auto; | ||||||
|         background: var(--main-background-color); |         background: var(--main-background-color); | ||||||
|  |         z-index: 500; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     body.mobile .classic-toolbar-widget .ck.ck-toolbar { |     body.mobile .classic-toolbar-widget .ck.ck-toolbar { | ||||||
| @@ -70,13 +71,7 @@ export default class ClassicEditorToolbar extends NoteContextAwareWidget { | |||||||
|             window.visualViewport.addEventListener("resize", () => { |             window.visualViewport.addEventListener("resize", () => { | ||||||
|                 const keyboardSize = originalHeight - window.visualViewport.height; |                 const keyboardSize = originalHeight - window.visualViewport.height; | ||||||
|                 const bottom = Math.max(keyboardSize, originalBottom); |                 const bottom = Math.max(keyboardSize, originalBottom); | ||||||
|  |                 this.$widget.css("bottom", `${bottom}px`); | ||||||
|                 if (keyboardSize !== 0) { |  | ||||||
|                     this.$widget.css("bottom", `${bottom}px`);`` |  | ||||||
|                 } else { |  | ||||||
|                     const style = window.getComputedStyle(this.$widget[0]); |  | ||||||
|                     this.$widget.css("bottom", style.getPropertyValue("--launcher-pane-size")); |  | ||||||
|                 } |  | ||||||
|             }); |             }); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user