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

Make it possible to focus a scrollable div without using the mouse #425

Closed
vbaruh opened this issue Dec 21, 2011 · 12 comments · Fixed by #2069
Closed

Make it possible to focus a scrollable div without using the mouse #425

vbaruh opened this issue Dec 21, 2011 · 12 comments · Fixed by #2069

Comments

@vbaruh
Copy link

vbaruh commented Dec 21, 2011

Take a look, my expectation is that the scrolling should work on the main frame but it does not affect anything.
Opening links functionality work fine.

@darylducharme
Copy link

I've noticed a similar issue on any page that uses divs instead of frames to have in page scrolling. Perhaps there is a way to go-to next scrollable div( gd?). Perhaps gf could be overloaded to include scrollable divs as well as frames, since functionally they have similarities (at least in this area).

Best I've been able to do is do a / search for a link in the div I wanted. Once that div has focus I can use space / shift+space to scroll that div.

int3 added a commit that referenced this issue Jan 13, 2012
@int3
Copy link
Collaborator

int3 commented Jan 15, 2012

You can now scroll a div using j/k if you click on it. (yes, the blasphemy!) This seems to give us parity with Pentadactyl, in fact. I think gd / overloading gf is definitely a good idea -- I'll implement it when I get the time. (Not taking it yet, though -- if anyone wants to take a stab at it, just leave a comment here!)

@darylducharme
Copy link

Hmm, int3, I'm not seeing this in the latest version I have on Chrome for windows 7 at the page noted here (or some others that I use). I am using Vimium 1.3.0 and I've tried to update and restart.

@int3
Copy link
Collaborator

int3 commented Jan 16, 2012

@darylducharme Oops, I should have been clearer -- I was referring to the code on GitHub. It's not available in the Chrome Web Store yet, but we should make another release soon.

@darylducharme
Copy link

Got it, that makes sense. I figured it was something like that since the commit was linked to this issue.

@philc
Copy link
Owner

philc commented Feb 13, 2012

The next piece to this puzzle is being able to focus that element with a keyboard shortcut.

@philc philc changed the title Scrolling does not work on http://developer.android.com/guide/index.html Make it possible to focus a scrollable div without using the mouse Aug 16, 2014
@philc
Copy link
Owner

philc commented Aug 16, 2014

I've updated the title so this issue is now clearer.

@marlun
Copy link

marlun commented Mar 14, 2016

I often need to click no the part of the page that I want to scroll before being able to use the keyboard. Is it still planned to make it possible using the keyboard?

@smblott-github
Copy link
Collaborator

Ah. The "Vimium click", @marlun.

Often, the gF (focus the main frame) command helps.

@marlun
Copy link

marlun commented Mar 15, 2016

Unfortunately that almost never works for me because it's never multiple frames. Take for example http://redux.js.org/docs/introduction/ThreePrinciples.html if I load it, move to another section using vimium F I can no longer scroll the main text div.

smblott-github added a commit that referenced this issue Mar 16, 2016
When the scrollers `activatedElement` isn't scrollable, we currently
search up the DOM tree for the next scrollable thing, and stop at
`document.body`.  However, it can be that that isn't scrollable.

When that happens, this commit searches for a scrollable element in the
same way as it does when the frame initially loads.  This makes it
possible to restart scrolling on pages like this one:

  - http://redux.js.org/docs/basics/UsageWithReact.html

after clicking one of index links.

Inspired by example posted by @marlun in #425.
smblott-github added a commit to smblott-github/vimium that referenced this issue Mar 16, 2016
smblott-github added a commit to smblott-github/vimium that referenced this issue Mar 26, 2016
When the scrollers `activatedElement` isn't scrollable, we currently
search up the DOM tree for the next scrollable thing, and stop at
`document.body`.  However, it can be that that isn't scrollable.

When that happens, this commit searches for a scrollable element in the
same way as it does when the frame initially loads.  This makes it
possible to restart scrolling on pages like this one:

  - http://redux.js.org/docs/basics/UsageWithReact.html

after clicking one of index links.

Inspired by example posted by @marlun in philc#425.
@smblott-github
Copy link
Collaborator

This branch is an extension of #2048 which (amongst other things) makes scrollable divs selectable. For example, with filtered hints, it looks like this...

snapshot

@tamvm
Copy link

tamvm commented Jun 29, 2021

This branch is an extension of #2048 which (amongst other things) makes scrollable divs selectable. For example, with filtered hints, it looks like this...

snapshot

Hi @smblott-github, thank you for your contribution in this project for the community.

The idea about choosing scrollable div is quite nice, I just want to ask about the implementation of that, how to config as your image?

Thank you,

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

Successfully merging a pull request may close this issue.

7 participants