vimperator / vimperator-labs

Vimperator
http://vimperator.org
Other
1.19k stars 196 forks source link

Mouseless text selection in pdf #662

Open tomak-git opened 7 years ago

tomak-git commented 7 years ago
Issue type:

I can't really tell which it is :)

Version:
Vimperator: 3.15.0 (created: 2016/10/05 01:11:26)
Firefox:    Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Description:

As per the accepted answer here you can select text on web pages by searching for a string, then entering caret and visual mode and expanding the selection as desired. This works well on web pages, but does not work with pdf.js. With pdfs, the caret does not move to the place of search hit so that when I enter the caret and visual modes, the selection begins at the beginning of the document.

Is there something that can be done about it? I know that pdfs are probably not a priority, but having a mouseless vim-like interface for both web and pdfs is too tempting :) (and yes, I tried zathura but its text selection also relies on mouse).

Expected behavior:

I would expect the behavior to be the same for web pages and pdfs given that the content is displayed in a tab in Firefox.

Steps to reproduce:
  1. Open a web page with text
  2. Search for a string of text and go to the first occurence
  3. Enter caret mode
  4. Enter visual mode
  5. Press right arrow

Result: selection begins from the string searched for in step 2.

Do all of the above with a pdf: selection begins from the start of the document.

tomak-git commented 7 years ago

I just realized that this is probably an issue of pdf.js itself (because there is the same problem with Firefox's native search and caret mode) so I opened issue #7925 for pdf.js. This one can probably be closed. Sorry for the confusion!

timss commented 7 years ago

Referenced issue: https://github.com/mozilla/pdf.js/issues/7925

Adding special behavior for pdf.js probably wouldn't be the most elegant of solutions, so :+1: at creating the other issue. I'll leave this one open until any conclusion can be drawn (here, or over at pdf.js).