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

Tab opens empty typeahead #10240

Closed

Conversation

shubham-padia
Copy link
Member

Commit 1:

typeahead: Tab opens typeahead if not open with a non-empty input.
Fixes part of #10026.
NOTE: The Tab key will select option from typeahead if the typeahead
is already open i.e the same behaviour as Enter.
NOTE: This behaviour applies irrespective of search pills are enabled
or not.

Commit 2:

search: Open typeahead on empty string only if lookup triggered by Tab. …
Fixes part of #10026.
Adds additional option to typeahead:
tabOpensEmptyTypeahead(default: false):
tabOpensEmptyTypeahead overrides helpOnEmptyStrings.
This commit sets helpOnEmptyStrings to false and
tabOpensEmptyTypeahead to true. Now typeahead will
open on an empty string only if Tab has been pressed.

peek 2018-08-08 23-43

Fixes part of zulip#10026.
NOTE: The Tab key will select option from typeahead if the typeahead
is already open i.e the same behaviour as Enter.
NOTE: This behaviour applies irrespective of search pills are enabled
or not.
Fixes part of zulip#10026.
Adds additional option to typeahead:
`tabOpensEmptyTypeahead`(default: false):
tabOpensEmptyTypeahead overrides helpOnEmptyStrings.
This commit sets helpOnEmptyStrings to false and
tabOpensEmptyTypeahead to true. Now typeahead will
open on an empty string only if Tab has been pressed.
@timabbott
Copy link
Sponsor Member

So, the following behaves oddly for me with these changes:

  • If I load the browser, and then hit /, and tab to open typeahead, enter now doesn't accept the typeahead (even afte rarrowing down).

@shubham-padia
Copy link
Member Author

@timabbott I'm unable to repro this. I may have misunderstood your comment, attaching below gif for reference (the keystrokes are not being shown on the screen, I'm just trying to confirm whether you did something similar)
peek 2018-08-18 05-14

@timabbott
Copy link
Sponsor Member

OK, I tested as well, and this seems to work correctly. Merged, thanks @shubham-padia!

@timabbott timabbott closed this Dec 4, 2018
@timabbott timabbott mentioned this pull request Dec 4, 2018
5 tasks
@timabbott
Copy link
Sponsor Member

I had to revert these commits, because they broke tabbing/shift-tabbing between the compose box recipient area for PMs and the main compose box.

@timabbott timabbott reopened this Dec 4, 2018
@zulipbot
Copy link
Member

Heads up @shubham-padia, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/master branch and resolve your pull request's merge conflicts accordingly.

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

Successfully merging this pull request may close these issues.

None yet

3 participants