fix: limit the size of the resource list viewer #4210
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As per issue #4209, when the text input area goes off screen (in this case due to a large number of images being uploaded) clicking on the
submit
button you get taken back to the text input are. this is due to thememoEditor
handleEditorFocus
triggering.This PR is to try keep the text input are in focus so that clicking the
submit
button does not triggerhandleEditorFocus
Design decisions:
The max height is the same as the max height for the text area to support large amounts of text
File upload current view
![Text input out of focus](https://private-user-images.githubusercontent.com/5203347/396909231-41a7c242-a2d0-4723-aca0-467c96215936.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjU1MjMsIm5iZiI6MTczOTM2NTIyMywicGF0aCI6Ii81MjAzMzQ3LzM5NjkwOTIzMS00MWE3YzI0Mi1hMmQwLTQ3MjMtYWNhMC00NjdjOTYyMTU5MzYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMTMwMDIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWY0ZDUzZmIyMjEzNTdlMmUyZTRlYzIyYzUyMTRhOTM1MDY4MTQyZGY2OWYxZDJmNWVkMDU1MmU4YTE5YWY3MSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.rjnm_cYhvABVWbx_Q4tzzen68wojQ5z2BzcY-V6eDwA)
File upload pr view
![Text input in focus](https://private-user-images.githubusercontent.com/5203347/396909502-419ea0b7-8220-420c-bfd4-62f80783a3c8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjU1MjMsIm5iZiI6MTczOTM2NTIyMywicGF0aCI6Ii81MjAzMzQ3LzM5NjkwOTUwMi00MTllYTBiNy04MjIwLTQyMGMtYmZkNC02MmY4MDc4M2EzYzgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMTMwMDIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Mzg1NzFjNGQ3ZWZlYzZlNGMxNjMzOGMxZTIxNjI4NjdmNzFhMzM0YzRjZjkyYTMxNTA5ZmJjYzc5MjY1OWFmYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.NORKJTgFgFdXwAHGkKuhMBwfuROZmtIKKGSl0MEWwzo)