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.

Strange selection problem in latest master version #8369

Closed

Description

@izuzak

waaat

I select some text, press r (or some other key), and the selected text is replaced with r, but the selection stays behind and is now selecting some other text. I'm in safe mode, Atom 1.0.8-469662a, OSX 10.10.4.

@nathansobo @benogle @maxbrunsfeld Any of you seeing the same thing and know what might be up? Doesn't happen on all selections but it seems to always happen when there's some text like foo bar, baz, and then I drag-select bar (up to but not including the ,), and then press a key to replace the selection.

Activity

  1. mnquintana commented on Aug 13, 2015

    @mnquintana
    Contributor

    @izuzak I've run into this quite a lot with 1.0.6 and 1.0.7. Haven't found precise repro steps yet though.

  2. izuzak commented on Aug 13, 2015

    @izuzak
    ContributorAuthor

    @mnquintana I'm able to reliably reproduce using the steps I described above. Does that reproduce the issue for you as well?

  3. mnquintana commented on Aug 13, 2015

    @mnquintana
    Contributor

    @izuzak I was able to reproduce this with those steps, but interestingly, after a few undos the steps didn't work anymore.

  4. izuzak commented on Aug 13, 2015

    @izuzak
    ContributorAuthor

    Sweet, thanks for confirming, @mnquintana. 🙇

  5. sethlopezme commented on Aug 13, 2015

    @sethlopezme

    This issue seems very related to #5200 and #5243. I run into this issue a lot, and it's a pretty big inconvenience. I'm surprised that this bug has made it so far.

  6. mnquintana commented on Aug 18, 2015

    @mnquintana
    Contributor

    I've been running into this multiple times an hour lately (but interestingly, I haven't run into this really at home, just at work). Would be awesome if someone could take a look at this soon. 🙇

  7. nathansobo commented on Aug 18, 2015

    @nathansobo
    Contributor

    @mnquintana I can't reproduce it so any information you can give us about the internal state of the editor, sections, the marker index would be helpful. I'll even screen share with you when it happens tomorrow if you have time.

  8. izuzak commented on Aug 18, 2015

    @izuzak
    ContributorAuthor

    @nathansobo I can reliably reproduce this. Open a new tab, trigger the lorem snippet, then drag select amet from left to right, then press r:

    You don't see that?

  9. nathansobo commented on Aug 18, 2015

    @nathansobo
    Contributor

    Sorry, I hadn't tried. I'll be back at my computer later today and will focus on this until it's fixed assuming I can reproduce it. Thanks!

  10. nathansobo commented on Aug 18, 2015

    @nathansobo
    Contributor

    I should say: I hadn't realized we had consistent reproduction steps.

  11. sethlopezme commented on Aug 18, 2015

    @sethlopezme

    @izuzak Oh, wow. With that example, I'm able to reproduce the issue quite a bit. Out of 25 tries, I was able to reproduce it 16 times.

    Actually, while I was testing this over and over again, I noticed a pattern. This tends to occur while the mouse cursor is over the selection while replacing the selected text. I know that might sound stupid, and I'm not really sure what's going on here, but I can reliably reproduce it every single time.

    In the examples below, I used the following steps:

    1. Used the lorem snippet to create some content.
    2. Created a selection by "clicking" and dragging over the characters, then "releasing" my mouse (I'm on a MBP trackpad - so not really releasing a mouse button, just removing my fingers).
    3. Typed the letter r (it can be anything).

    The only difference between them is mouse placement after the selection (after "releasing" the mouse). Every time the cursor remained over the selection, I observed this bug. See the examples:

    selection-bug-cursor-moved

    selection-bug-cursor-static

    Also, if you'll notice in the gifs that were previously posted by @izuzak, his cursor remains over the selection in both.

    Here are my specs in case they might be helpful:

    • Atom 1.0.7
    • Apple MacBook Pro (2014)
    • Mac OS X Yosemite 10.10.5

    Let me know there is any other helpful information I can give.

  12. nathansobo commented on Aug 18, 2015

    @nathansobo
    Contributor

    I'm still unable to reproduce this by any of the steps people are suggesting. Maybe an obvious question: Is everyone able to reproduce this in safe mode?

    cant-reproduce

  13. sethlopezme commented on Aug 18, 2015

    @sethlopezme

    @nathansobo I am able to reproduce it in safe mode. See my gif below:

    selection-bug-cursor-static-safemode

    Not sure why, but I tried it a few times in safe mode before recording the gif, and I couldn't get it to happen on "Lorem"... Still, though, you can see it happening on even larger chunks of text.

  14. luishdez commented on Aug 19, 2015

    @luishdez

    Same problem with selection. using OS X

    Also when I "double-click" a word it won't select last char

  15. nathansobo commented on Aug 19, 2015

    @nathansobo
    Contributor

    @izuzak Do you have time to screen share tomorrow during the morning US mountain time? I can't reproduce this but obviously it's a huge problem. Maybe I can get some insight from your machine.

  16. izuzak commented on Aug 19, 2015

    @izuzak
    ContributorAuthor

    @izuzak Do you have time to screen share tomorrow during the morning US mountain time?

    @nathansobo Yeah, for sure -- I'll be here. 👍

    It's interesting that you're having trouble reproducing this. I just played with this a bit more and perhaps you're not hitting a key quickly enough after dragging the selection? Or perhaps you're not selecting by dragging but by double-clicking? If I wait too long after selecting or if I select by double-clicking -- the problem doesn't manifest itself.

  17. nathansobo commented on Aug 19, 2015

    @nathansobo
    Contributor

    Okay, after screen sharing with @izuzak, we've narrowed this down.

    There seems to be a several hundred millisecond pause before the mouseup event is fired when dragging with a trackpad on OS X Yosemite. So what's happening is that Atom thinks you're still dragging during the text input, which causes the selection to extend from the end of the inserted text to the location of the mouse cursor. I'm still on Mavericks (believe it or not), which doesn't exhibit this behavior.

    I'll need to investigate the reason for this mouseup delay when dragging. One possible workaround we could implement is to force the mouseup handler to fire no matter what when there's a textInput event if we're still dragging.

  18. mnquintana commented on Aug 19, 2015

    @mnquintana
    Contributor

    when dragging with a trackpad on OS X Yosemite

    Ah that makes a lot of sense - at work I use a trackpad, but at home I use an external mouse, which would explain why I was only experiencing this at work.

  19. reopened this on Sep 1, 2015
  20. izuzak commented on Sep 1, 2015

    @izuzak
    ContributorAuthor

    This can still be reproduced by using the delete key, see the discussion in #8446 (comment).

  21. 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!

  22. 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

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions