Fix persistent tooltip in the "new folder" input of the file picker #30305
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.
When a new folder is tried to be created in the file picker dialog a tooltip is shown on the input if the folder name exists already.
However, this tooltip was not cleared, so it was still shown even if the name was fixed, the folder was created and then the "New folder" input was shown again.
Now the tooltip is cleared as soon as the input changes, as keeping it shown in that case did not provide any benefit either (and it is consistent with how the "new folder" input works in the Files app view).
The input is also cleared whenever the menu that shows the input is opened again, as otherwise the tooltip would be still shown if the menu was closed and opened again without changing the input (and the menu could be opened again after changing to another directory where the new folder name is no longer duplicated).
How to test (scenario 1)
Result with this pull request
The tooltip is not shown.
Result without this pull request
The tooltip is still shown.
How to test (scenario 2)
Result with this pull request
The tooltip is not shown.
Result without this pull request
The tooltip is still shown, even if the input text is now "New folder".
How to test (scenario 3)
Result with this pull request
The tooltip is not shown.
Result without this pull request
The tooltip is still shown, even if "Parent" does not exist in the current folder.