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

QueryField: Fix wrong cursor position on autocomplete #55576

Merged
merged 1 commit into from Sep 21, 2022

Conversation

svennergr
Copy link
Contributor

What this PR does / why we need it:
A user who selects an auto-complete suggestion in the Loki code query editor for filters will have their cursor placed outside the quotation marks instead of inside.

Which issue(s) this PR fixes:

Fixes https://github.com/grafana/support-escalations/issues/3935

Special notes for your reviewer:

Steps to replicate the issue:

  1. On https://play.grafana.com/ use the Loki data source on Explore (https://play.grafana.org/goto/JMl5GknVz?orgId=1)
  2. Use the code query editor
  3. Begin typing any query, e.g. {host="appfelstrudel"}
  4. Add a pipe + any filter, e.g. {host="appfelstrudel"} | regexp ""
  5. IMPORTANT: to replicate the behavior, when typing out regexp, click the auto-complete suggestion
  6. After using the auto-complete suggestion, you'll notice your cursor is automatically placed outside the "" instead of inside, which would be expected

With the fix:

Screen.Recording.2022-09-21.at.16.00.27.mov

@svennergr svennergr added type/bug add to changelog backport v9.1.x Bot will automatically open backport PR labels Sep 21, 2022
@svennergr svennergr added this to the 9.1.7 milestone Sep 21, 2022
@svennergr svennergr self-assigned this Sep 21, 2022
@svennergr svennergr requested review from a team as code owners September 21, 2022 14:09
@svennergr svennergr requested review from a team, joshhunt, ashharrison90, jackw, oscarkilhed, supilee and kaydelaney and removed request for a team, ashharrison90, jackw, oscarkilhed and supilee September 21, 2022 14:09
@grafanabot
Copy link
Contributor

@svennergr svennergr merged commit e550031 into main Sep 21, 2022
@svennergr svennergr deleted the svennergr/fix-slate-typeahead branch September 21, 2022 17:39
grafanabot pushed a commit that referenced this pull request Sep 21, 2022
svennergr added a commit that referenced this pull request Sep 22, 2022
(cherry picked from commit e550031)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
@daniel-leibold
Copy link

Hi all,

will this fix also be backported to 8.5.14? Like #54535
We are still on 8.5.

Thanks for any hint.

@svennergr
Copy link
Contributor Author

Hi @daniel-leibold,

I don't think we will backport this issue as the impact of the bug is not as critical as #54535.

Thanks for your understanding.

@muffl0n
Copy link

muffl0n commented Oct 5, 2022

Version bump in helm-chart: grafana/helm-charts/pull/1872

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

5 participants