feat(scrolling): switch to smooth scrolling by default + increase compat #104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODOs:
G/ggmappings in an editable contextG/ggI think this is worse, but for<c-d>it's more questionable<C-,>or similar to blur elementgg/Gin particular<C-d>/<C-u>in particularWe now treat:
hjklas just normal arrow keys<c-u>/<c-d>as<pageup>/<pagedown>Gas<D-down>/<C-end>on macos/linuxggas<D-up>/<C-home>on macos/linuxThis change was made for a couple reasons:
This is not a free lunch change though, as we're now sending arrow keys to the content frame for hjkl, there are some implications, both good and bad.
It's good because a website could have custom behaviour for arrow keys that is more desirable than trying to scroll the frame
It's also bad for the same reason, a user could reasonably be surprised that hjkl no longer scrolls on a particular website they're using.
I think the trade off here is worth it for the increased compatibility and smooth scrolling. We can revisit this in the future if it is indeed problematic.
I also did try to figure out if it'd be possible to just call the internal Firefox functions that pressing arrow keys ends up calling, but that posed to be quite difficult. All of that logic is entrenched heavily with the expectation that there is a KeyboardEvent. Additionally attempting to just call the deeper internals, just resulted in the same bugs that the current implementation has.
I wouldn't be surprised if there is a better way to do this, but I
don't think it's worth more time investment here trying to figure that
out.
notes:
closes #105