Skip to content

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

fix caret is at the start of default value in dialog input

ammarahm-ed9ec12e084cbe
diff --git a/apps/mobile/src/components/Dialog/index.js b/apps/mobile/src/components/Dialog/index.js
index eb9039e6f..1d6d7e6eb 100644
--- a/apps/mobile/src/components/Dialog/index.js
+++ b/apps/mobile/src/components/Dialog/index.js
@@ -90,6 +90,10 @@ export const Dialog = ({context = 'global'}) => {
statusBarTranslucent={false}
onShow={async () => {
if (dialogInfo.input) {
+
+ inputRef.current?.setNativeProps({
+ text:dialogInfo.defaultValue
+ });
await sleep(100);
inputRef.current?.focus();
}
@@ -118,7 +122,7 @@ export const Dialog = ({context = 'global'}) => {
setInputValue(value);
}}
secureTextEntry={dialogInfo.secureTextEntry}
- defaultValue={dialogInfo.defaultValue}
+ //defaultValue={dialogInfo.defaultValue}
onSubmit={onPressPositive}
returnKeyLabel="Done"
returnKeyType="done"