Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix (github issues): cursor jumps to start on layout

ammarahm-ed549a4ec99469
diff --git a/apps/mobile/src/components/sheets/github/issue.js b/apps/mobile/src/components/sheets/github/issue.js
index 2df1e8595..7dba7a802 100644
--- a/apps/mobile/src/components/sheets/github/issue.js
+++ b/apps/mobile/src/components/sheets/github/issue.js
@@ -24,6 +24,7 @@ export const Issue = ({ defaultTitle, defaultBody, issueTitle }) => {
const user = useUserStore(state => state.user);
const [loading, setLoading] = useState(false);
const bodyRef = useRef();
+ const initialLayout = useRef(false);
const onPress = async () => {
if (loading) return;
@@ -139,6 +140,8 @@ For example:
textAlignVertical="top"
onChangeText={v => (body.current = v)}
onLayout={() => {
+ if (initialLayout.current) return;
+ initialLayout.current = true;
if (body.current) {
bodyRef.current?.setNativeProps({
text: body.current,