From db1c3b1f8a09b6a28172831475a3a67eab333c6a Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 7 Sep 2018 19:38:00 +0000 Subject: [PATCH] Fixed cursor position after styling Refs #49 --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index a1081f5e..731996a4 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -252,6 +252,7 @@ public class FragmentCompose extends FragmentEx { s.setSpan(new StyleSpan(v.getId() == ibBold.getId() ? Typeface.BOLD : Typeface.ITALIC), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); etBody.setText(s); + etBody.setSelection(end); } } };