Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Partial selection is left behind #5243

Closed

Description

@demisx

(I am able to reproduce this in safe mode in latest Atom 0.175.0)

Not always, but quiet often, I have partial selection left behind when I select a portion of code on one line and then start typing hoping to replace the selected chars. When I type my first char, this causes selection jump to the characters on the right and they get deleted when I type the second char. For example, I have this test.js file:

  var where = _.pick({
    classified_id: query.classId,
    section_id: query.secId,
    category_id: query.catId
  }, function(val, key) {
    console.log('  **** val:', val);
    console.log('  **** key:', key);
    return !_.isUndefined(val);
  });

To replicate:

  1. Select a portion of code on any line with a mouse or a touchpad. Release the mouse button.
  2. Switch to keyboard and press the space bar
  3. You should see that the selected chars were deleted, but some of the chars on the right are selected now too.
  4. Press space bar again, and those extra selected chars get deleted
  5. Do steps 1 and 2 a few times if you can't replicate it on first time.

This is a real pain since I always have to do Command + Z to undo these side effects. Sometimes, I don't notice it and my code no longer runs.

Activity

  1. mnquintana commented on Jan 24, 2015

    @mnquintana
    Contributor

    I can reproduce this 100% of the time with these steps:

    1. Select a portion of code on any line with the mouse, but don't release the mouse button
    2. Press space bar
    3. Extra chars get selected

    Basically, this only seems to happen if you don't release the mouse button before you enter new text (which is probably why it was only sporadic for you).

    I don't know what the expected behavior is for this though to be honest.

    (Related to or duplicate of #5200)

    Atom: 0.175.0
    OS: OS X 10.10.1
    Reproduced in safe mode

  2. demisx commented on Jan 24, 2015

    @demisx
    Author

    @mnquintana No, it has nothing to do with not releasing the mouse button. I do select the text first (via Mac touchpad, if that matters), then move on to my keyboard and start typing. So, there is plenty of time in between. I'll modify the original steps to make this more clear.

  3. stervo4ka commented on Jan 25, 2015

    @stervo4ka

    It's not exactly what I've observed (and described in #5200). Here's said that some text after the space becomes selected, while I got the space itself being selected. But probably these are some random variations of the same bug.
    Also I'd like to confirm that typing while not releasing the mouse button is not the case.

  4. sethlopezme commented on Aug 13, 2015

    @sethlopezme

    It appears that this issue is still present in the latest version of Atom (1.0.7). I can confirm that this happens at random times, whether text was selected by the mouse or with the text cursor. It's a pretty annoying bug because there isn't really any way to predict when it is going to happen.

    Edit: I wasn't able to replicate the issue with the instructions given above, but this happens to me multiple times throughout any given day with Atom. I don't think it necessarily has anything to do with the spacebar or mouse or anything, just making a replacement with text that's been selected.

  5. demisx commented on Aug 13, 2015

    @demisx
    Author

    Yes, and this issue is still present in the latest Chrome browser. Perhaps, Atom has inherited it?

  6. lock commented on Jan 20, 2019

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  7. locked as resolved and limited conversation to collaborators on Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions