Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Move cursor to the end of input when clicking on dialpad text field",
"packageName": "@azure/communication-react",
"email": "carolinecao@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Move cursor to the end of input when clicking on dialpad text field",
"packageName": "@azure/communication-react",
"email": "carolinecao@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,15 @@ const DialpadContainer = (props: {
onChange={(e: any) => {
setText(e.target.value);
}}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onClick={(e: any) => {
const input = e.target;
const end = input.value.length;

// Move focus to end of input field
input.setSelectionRange(end, end);
input.focus();
Comment thread
carocao-msft marked this conversation as resolved.
}}
placeholder={props.strings.placeholderText}
data-test-id="dialpad-input"
onRenderSuffix={(): JSX.Element => (
Expand Down