decklin / yakshave

Yet Another Key-binding System Halfway Approximating Vi or Emacs (for Chromium)
Other
18 stars 4 forks source link

Ctrl-F needs to be smarter #6

Open wh5a opened 14 years ago

wh5a commented 14 years ago

Emacs' Ctrl-F keybinding is disabled by default, which is good. Unless there really is a horizontal scroll bar. The problem is that we lose the find text functionality. Can we stop overriding Ctrl-F when we scroll to the right end?

decklin commented 14 years ago

It should do that already, but it's buggy on some pages. The test is

if (window.innerWidth + window.scrollX - 15 < document.width)

15 is the difference I got between window.innerWidth + window.scrollX and document.width when I tried opening a bunch of pages and scrolling all the way to the right (I also took a screenshot and measured the scrollbar; same thing). It should not be hard coded (it's probably wrong on other platforms) but I don't know how to properly get the real value.

decklin commented 14 years ago

I think if I removed the scrollbar kludge (the 15 pixels) it would probably work better. I'm going to try running with that for a while. It will prevent you from scrolling completely to the right.