mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #1840] Control arrow right and left still bind to change history #585
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#585
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mandaputtra on GitHub (Sep 27, 2021).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1840
Describe the bug
Mostly when I navigate the text, I use
CTRL + <-orCTRL + ->to navigate per word, but when I use it on the body editor it navigate through my browser history not per word.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Navigating per word
Desktop (please complete the following information):
Additional context
I thik I can contribute to solve this issue. Tell me If this is necessary I'll work on it.
@liyasthomas commented on GitHub (Sep 27, 2021):
hi @mandaputtra, thanks for reporting this behavior. We'd be happy if you can figure out a fix to this.
I'd like to mention our universal action handler and resolver logic which is probably the root cause of this behavior.
actions.tsdefines the key bindings and their corresponding action keywords.Here it's
navigation.jump.backandnavigation.jump.forwardgithub.com/hoppscotch/hoppscotch@728515c225/packages/hoppscotch-app/helpers/actions.ts (L30-L31)default.vuedefines the corresponding action handlers.github.com/hoppscotch/hoppscotch@dcbb17b164/packages/hoppscotch-app/layouts/default.vue (L127-L132)A universal fix to actions interfering with the native behaviors like navigating per word is to disable them when the focus is in
textareas,input,contenteditableetc. This has been already implemented inisTypableElement()indom.tsbut doesn't seem to be working :(. Fixing this should resolve the reported issue.github.com/hoppscotch/hoppscotch@dcbb17b164/packages/hoppscotch-app/helpers/utils/dom.ts (L5-L19)Guess this will be helpful.
@deepto98 commented on GitHub (Sep 30, 2021):
@liyasthomas Hi, I'd like to work on this issue. If it isn't assigned already, can you please assign this to me?
@mandaputtra commented on GitHub (Sep 30, 2021):
Go ahead if you want. I actually want to work on this weekend. Got so much to do on weekday :((
@deepto98 commented on GitHub (Sep 30, 2021):
@mandaputtra Okay, sure. I also have some work during the week . Will try to work on this once I'm free and keep you updated.
@JeremyJaydan commented on GitHub (Oct 1, 2021):
Was about to make an issue on this, I'm keen for a solution! :)
@Sayan-dev commented on GitHub (Oct 4, 2021):
I can finish this up on weekdays I hope and if you don't mind @deepto98
@liyasthomas How about I work on it now
@rishabhkalra96 commented on GitHub (Oct 8, 2021):
@deepto98 @Sayan-dev @liyasthomas is anyone looking into this issue anymore ? If not, i can look into it and provide a fix.
@mandaputtra commented on GitHub (Oct 8, 2021):
@rishabhkalra96 go ahead, the fix is simple actually.
@rishabhkalra96 commented on GitHub (Oct 8, 2021):
Hi @mandaputtra , It might sound kinda absurd but which branch should i start looking into ? I am currently reproducing the issue on main using mac and the behaviour is same. On using cmd + left arrow either on url bar or body, it routes instead of skipping a word.
@mandaputtra commented on GitHub (Oct 8, 2021):
on branch main, I don't own mac so i don't know if that is a preferred or not. Just make sure whenever you're on body or input ctrl + arrow right/left doesn't change routes
@rishabhkalra96 commented on GitHub (Oct 8, 2021):
thanks for the reply. I looked into the changes and found out that the below conditions on line 99 are letting the meta + event reach default jumpActions. Removing the not conditions fixed the issue.
github.com/hoppscotch/hoppscotch@d2b39976ba/packages/hoppscotch-app/helpers/keybindings.ts (L93-L111)github.com/hoppscotch/hoppscotch@d2b39976ba/packages/hoppscotch-app/layouts/default.vue (L109-L133)Also, note that the issue is not just in linux, its consistent with all browsers. Since i don't own windows, so cant really tell about it but on mac its reproducible as in ubuntu (both on chrome and brave).
@liyasthomas commented on GitHub (Oct 8, 2021):
@mandaputtra please verify if the deploy preview resolves this issue.