Skip to content

Inconsistent delete behavior #2521

Closed
Closed

Description

@ramdog

There is inconsistent behavior with respect to deleting a search. Steps to reproduce:

Flow A:

  1. Search for something (non matched query)
  2. Delete to the beginning (command + backspace)
  3. Note the message the remains about an unmatched query

Flow B:

  1. Search for something (non matched query) - same as above^^^
  2. Select all (command + A)
  3. Delete (backspace)
  4. Note it clears the search, which is different than the behavior as noted above

I would expect it to always work as Flow B. Flow A seems like a bug to me.

Screencast taken directly from demo page:
ulxzkbt7dc

Activity

  1. tjschuck commented on Feb 3, 2016

    @tjschuck
    Contributor

    Thanks for the detailed report, @ramdog !

    However, I can't reproduce 😬 What browser, browser version, OS, and OS version are you using?

  2. ramdog commented on Feb 3, 2016

    @ramdog
    Author

    @tjschuck Thanks for the quick reply! Good point, should have noted:

    1. Chrome Version 48.0.2564.97 (64-bit)
    2. Mac OS X Yosemite Version 10.10.5 (14F1509)
  3. tjschuck commented on Feb 3, 2016

    @tjschuck
    Contributor

    Hm, on the same version of Chrome, I'm not seeing the issue. If I press cmd-backspace, as soon as I release command, it clears as I'd expect.

    I'm on OS X El Cap, though, so perhaps that's the problem, though I doubt it would be...

  4. ramdog commented on Feb 3, 2016

    @ramdog
    Author

    Hmm, I just borrowed my cubemate's machine which is on El Cap (not sure on Chrome version) and I saw the same behavior (the buggy behavior).

    When you say you can't reproduce, does that mean you only see the results in Flow A or Flow B?

  5. tjschuck commented on Feb 3, 2016

    @tjschuck
    Contributor

    Same as your expectations -- Flow B seems correct; Flow A seems like a bug. But for me, Flow A (cmd-backspace) also clears the search as expected.

  6. ramdog commented on Feb 3, 2016

    @ramdog
    Author

    Got it, interesting. One thing I've noticed (without looking at the source yet) is that there seems to be some sort of debounce when updating the No results match "blahhhhhhhhhhhhhhh" but specifically on delete. In other words, if you:

    1. enter a long random (unmatched string), you'll note the "no results match" message, then
    2. hold down delete for a second or two to iteratively delete few characters in a row...

    then I don't see the search update from:
    No results match "blahhhhhhhhhhhhhhh"

    to

    No results match "blahhh"

    until I let go of delete. Just a random observation, not sure if that's related to the issue. In any case, if you'd rather close this issue, that's cool.

  7. tjschuck commented on Feb 3, 2016

    @tjschuck
    Contributor

    I'll leave it open for now for someone else to hopefully confirm/deny a reproduction on their end as well. Please submit a PR if you have any ideas on getting the behaviors to match!

  8. ramdog commented on Feb 3, 2016

    @ramdog
    Author

    Will do, thanks. Last thing to note for anyone looking into this: it seems I get the expected (Flow B) behavior when I use option + delete (word by word delete) vs command + delete (delete to beginning of line), on my mac keyboard.

  9. koenpunt commented on Feb 24, 2016

    @koenpunt
    Contributor

    I can reproduce. Probably the keyup event of the meta key is not handled.

  10. IanSimpson commented on Sep 25, 2016

    @IanSimpson

    I can reproduce. This Stackoverflow thread has details of the issue. It is expected behaviour, with no known workaround to the root issue.

    I've submitted a PR which simply allows the search function to run when Cmd is pressed. This is an effective workaround, and doesn't seem to introduce any issues (other than potentially being less efficient if someone is pushing Cmd/Windows Key).

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