forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Expensify#27702 from chiragxarora/fix/21654
- Loading branch information
Showing
8 changed files
with
297 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Place the cursor at the end of the value (if there is a value in the input). | ||
* | ||
* When a multiline input contains a text value that goes beyond the scroll height, the cursor will be placed | ||
* at the end of the text value, and automatically scroll the input field to this position after the field gains | ||
* focus. This provides a better user experience in cases where the text in the field has to be edited. The auto- | ||
* scroll behaviour works on all platforms except iOS native. | ||
* See https://github.com/Expensify/App/issues/20836 for more details. | ||
* | ||
* @param {Object} input the input element | ||
*/ | ||
export default function updateMultilineInputRange(input) { | ||
if (!input) { | ||
return; | ||
} | ||
|
||
/* | ||
* Adding this iOS specific patch because of the scroll issue in native iOS | ||
* Issue: does not scroll multiline input when text exceeds the maximum number of lines | ||
* For more details: https://github.com/Expensify/App/pull/27702#issuecomment-1728651132 | ||
*/ | ||
input.focus(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.