Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Creating, renaming, or deleting an item causes Files to select additional items #11092

Closed
ggtylerr opened this issue Jan 26, 2023 · 13 comments · Fixed by #11237
Closed

Bug: Creating, renaming, or deleting an item causes Files to select additional items #11092

ggtylerr opened this issue Jan 26, 2023 · 13 comments · Fixed by #11237

Comments

@ggtylerr
Copy link

Description

When creating a new folder and giving it a name (and using the preview version of Files), it instead makes a folder called "New Folder", and then selects other items.

Desktop.-.Files.2023-01-26.13-57-41.mp4

This issue is more apparent in bigger directories, as there's more files and folders to select.

Steps To Reproduce

  1. Use the preview version
  2. Make a new folder
  3. Try to name it
  4. Confirm

Steps to fix

  • Actually name the folder
  • Don't select other folders / items after confirmation (maybe it's tied to the feature where you press A and you select the first file / folder that starts with A)

Files Version

2.4.24.0

Windows Version

Windows 11 22H2 22621.1105

Log file

debug.log

@ggtylerr ggtylerr added the bug label Jan 26, 2023
@Josh65-2201
Copy link
Member

The naming issue has been fixed and will be included in the next update

@yaira2
Copy link
Member

yaira2 commented Jan 26, 2023

@Josh-65 does it fix the selection issue too?

@Josh65-2201
Copy link
Member

Josh65-2201 commented Jan 26, 2023

No. Not that ive seen anyway

@yaira2 yaira2 moved this to 📋 Planning stage in Files task board Jan 26, 2023
@yaira2 yaira2 moved this from 📋 Planning stage to 🔖 Ready to build in Files task board Jan 26, 2023
@yaira2 yaira2 changed the title Creating new folder and naming it causes Files to select other items instead of naming Bug: Creating new folder and naming it causes Files to select other items instead of naming Jan 26, 2023
@yaira2 yaira2 changed the title Bug: Creating new folder and naming it causes Files to select other items instead of naming Bug: Creating new folder and naming it causes Files to select additional items Feb 2, 2023
@yaira2
Copy link
Member

yaira2 commented Feb 7, 2023

@Josh-65 I can't reproduce this anymore, can you check if it's still an issue?

@yaira2 yaira2 added the needs - additional info Needs more information from the reporter label Feb 7, 2023
@ggtylerr
Copy link
Author

ggtylerr commented Feb 7, 2023

I'm still able to on v2.4.31.0. Not sure when building from source (kinda don't want to reinstall visual studio rn.)
It's most noticeable on directories with lots of files.

@yaira2
Copy link
Member

yaira2 commented Feb 7, 2023

That might be why, I was testing in a folder with three items.

@yaira2 yaira2 removed the needs - additional info Needs more information from the reporter label Feb 7, 2023
@yaira2 yaira2 changed the title Bug: Creating new folder and naming it causes Files to select additional items Bug: Renaming or deleting a folder causes Files to select additional items Feb 7, 2023
@yaira2 yaira2 pinned this issue Feb 7, 2023
@QuaintMako
Copy link
Contributor

QuaintMako commented Feb 8, 2023

It seems to be linked to a timing issue. When using breakpoints to debug, the issue seems to not reproductible. The selected additional items be are also consistent regarding to the renamed item. (I'm yet to find the logic behind)

Might be linked to a fire and forget call, or an await that does not work properly.

@hishitetsu
Copy link
Member

hishitetsu commented Feb 9, 2023

I managed to find suspicious behavior.
When I created a folder named ggg, multiple ContainerContentChanging events occurred. I found one of these events has different properties than expected.
image
Item and ItemContainer.Content refer to different items. Because of this, it appears to check the Visual Studio 2022 checkbox with the intention of checking the ggg checkbox.
I have no idea why this would happen.

@yaira2
Copy link
Member

yaira2 commented Feb 9, 2023

@chingucoding

@ggtylerr
Copy link
Author

ggtylerr commented Feb 9, 2023

After a bit of testing, I've noticed this also happens with files, meaning it's most likely tied to general item events. Updated the title to reflect this.

@ggtylerr ggtylerr changed the title Bug: Renaming or deleting a folder causes Files to select additional items Bug: Creating, renaming, or deleting an item causes Files to select additional items Feb 9, 2023
@hishitetsu
Copy link
Member

I managed to find a way to fix it! I will submit a PR later.

@Josh65-2201 Josh65-2201 moved this from 🔖 Ready to build to 🏗 In progress in Files task board Feb 10, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Files task board Feb 10, 2023
@hecksmosis
Copy link
Contributor

@yaira2 You should probably unpin this

@yaira2
Copy link
Member

yaira2 commented Feb 12, 2023

Will do, thank you.

@yaira2 yaira2 unpinned this issue Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants