From c0af596f2d69654b50dffc36250137998dc629fb Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Wed, 28 Sep 2022 18:36:42 +0530 Subject: [PATCH] fix: sticky header behavior on iOS (#1662) --- .../web/src/javascripts/Components/NoteView/NoteView.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/web/src/javascripts/Components/NoteView/NoteView.tsx b/packages/web/src/javascripts/Components/NoteView/NoteView.tsx index 4b21e8337..1c06c3aa8 100644 --- a/packages/web/src/javascripts/Components/NoteView/NoteView.tsx +++ b/packages/web/src/javascripts/Components/NoteView/NoteView.tsx @@ -13,6 +13,7 @@ import { NoteViewController, PayloadEmitSource, WebAppEvent, + Platform, } from '@standardnotes/snjs' import { debounce, isDesktopApplication, isIOS } from '@/Utils' import { EditorEventSource } from '../../Types/EditorEventSource' @@ -928,7 +929,11 @@ class NoteView extends PureComponent { className={classNames( 'content-title-bar section-title-bar z-editor-title-bar w-full bg-default', this.state.shouldStickyHeader && 'fixed top-0', - this.state.shouldStickyHeader ? (isIOS() ? 'pt-safe-top' : 'pt-4') : '', + this.state.shouldStickyHeader + ? isIOS() || this.application.platform === Platform.Ios + ? 'pt-safe-top' + : 'pt-4' + : '', )} >