Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Hitting enter quickly can sometimes cause file rename to cut off new name #10531

Closed
njx opened this issue Feb 5, 2015 · 9 comments
Closed

Hitting enter quickly can sometimes cause file rename to cut off new name #10531

njx opened this issue Feb 5, 2015 · 9 comments

Comments

@njx
Copy link

njx commented Feb 5, 2015

Running into this on Mac 10.10.2.

  1. In the file tree, right-click and choose New File
  2. Type a new name like "foobar.js" and very quickly hit return after typing the "js"

Result: sometimes the new file will be named "foobar.j".

@njx
Copy link
Author

njx commented Feb 5, 2015

I'm hitting this pretty often.

@codymaines
Copy link

I'm unable to reproduce this on Windows - what version & operating system are you using?

@njx
Copy link
Author

njx commented Feb 6, 2015

Mac 10.10.2. I just tried it in master again and it seems to be much harder to hit than in 1.1, so maybe something's improved, but I can get it if I type fast enough - I can see the last character show up in the input field but get truncated in the final filename. But it's hard enough to hit now that it's probably low priority - I'll try it again when 10.2 releases and see if it's still hard to hit.

@njx
Copy link
Author

njx commented Feb 6, 2015

I do still seem to be hitting this in master with some frequency, so probably still worth looking into at some point.

@peterflynn
Copy link
Member

@njx Sounds like a dupe of #10048, which we also had trouble reproducing...

@njx
Copy link
Author

njx commented Feb 6, 2015

That does sound like it, but I seem to be hitting it even without everything being slow (although it did seem more common, and also a tad slower, when I was using 1.1, which might have been because I had it open for longer or was working in a larger project).

@peterflynn
Copy link
Member

@njx The filer of #10618 reports that this happens when you haven't released the last letter key before pressing Enter -- i.e. the Enter keydown precedes the last letter key's keyup. Do you think that could be what's happening in your case too?

@njx
Copy link
Author

njx commented Feb 18, 2015

That certainly seems plausible (and I can reproduce that reported behavior). Thanks to @ElegantScripting for figuring it out.

@prksingh
Copy link
Contributor

Should be fixed with #10648

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants
@njx @peterflynn @prksingh @codymaines and others