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

Inconsistent delete behavior #2521

Closed
ramdog opened this issue Feb 3, 2016 · 10 comments
Closed

Inconsistent delete behavior #2521

ramdog opened this issue Feb 3, 2016 · 10 comments
Labels

Comments

@ramdog
Copy link

ramdog commented Feb 3, 2016

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

@tjschuck
Copy link
Member

tjschuck commented Feb 3, 2016

Thanks for the detailed report, @ramdog !

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

@ramdog
Copy link
Author

ramdog commented Feb 3, 2016

@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)

@tjschuck
Copy link
Member

tjschuck commented Feb 3, 2016

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

@ramdog
Copy link
Author

ramdog commented Feb 3, 2016

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?

@tjschuck
Copy link
Member

tjschuck commented Feb 3, 2016

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.

@ramdog
Copy link
Author

ramdog commented Feb 3, 2016

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.

@tjschuck
Copy link
Member

tjschuck commented Feb 3, 2016

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!

@ramdog
Copy link
Author

ramdog commented Feb 3, 2016

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.

@koenpunt
Copy link
Collaborator

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

@IanSimpson
Copy link

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

@ramdog ramdog closed this as completed Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants