Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 225bc55

Browse files
keianhzobluemarvin
authored andcommitted
Position the caret at the start position after cutting the text (#2668)
1 parent bf1c535 commit 225bc55

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/src/common/shared/org/mozilla/vrbrowser/ui/views/NavigationURLBar.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,8 @@ public void onAction(String action) {
608608
String selectedText = mBinding.urlEditText.getText().toString().substring(startSelection, endSelection);
609609
clipboard.setPrimaryClip(ClipData.newPlainText("text", selectedText));
610610
mBinding.urlEditText.setText(StringUtils.removeRange(mBinding.urlEditText.getText().toString(), startSelection, endSelection));
611+
mBinding.urlEditText.setSelection(startSelection);
612+
611613
} else if (action.equals(GeckoSession.SelectionActionDelegate.ACTION_COPY) && selectionValid) {
612614
String selectedText = mBinding.urlEditText.getText().toString().substring(startSelection, endSelection);
613615
clipboard.setPrimaryClip(ClipData.newPlainText("text", selectedText));

0 commit comments

Comments
 (0)