fanglingsu / vimb

Vimb - the vim like browser is a webkit based web browser that behaves like the vimperator plugin for the firefox and usage paradigms from the great editor vim. The goal of vimb is to build a completely keyboard-driven, efficient and pleasurable browsing-experience.
https://fanglingsu.github.io/vimb/
GNU General Public License v3.0
1.34k stars 100 forks source link

Numeric hinting sometimes filters on numeric input #623

Closed pjones closed 4 years ago

pjones commented 4 years ago

Steps to reproduce

Start vimb like so:

cat >test.html <<EOF
<html>
<title>Test</title>
<h1>Test</h1>
<section>
  <div role="button">Test</div>
  <div role="button">Test</div>
  <div role="button">Test</div>
  <div role="button">Test</div>
  <div role="button">Test</div>
  <div role="button">Test</div>
  <div role="button">Test</div>
  <div role="button">Test</div>
  <div role="button">Test</div>
  <div role="button">Test</div>
</section>

<script>
  let nodes = document.querySelectorAll('[role="button"]');
  for (let i=0; i<nodes.length; ++i) {
    nodes[i].addEventListener("click", function(e) {
      console.log("click", e);
    });
  }
</script>
EOF

vimb -c /dev/null -C "set hint-follow-last=false|set hint-timeout=0" test.html

Expected behaviour

  1. Type f to start hinting

  2. Press any number.

  3. The matching element should be highlighted.

Actual behaviour

Numeric input is treated like a filter instead of selecting the hint. For example:

  1. Type f to start hinting

  2. Press the number 9 on the keyboard

  3. All hints disappear

  4. The inputbox contains ;o9

(Note, I think this might be related to #554)

Version Information

Version:         3.6.0
WebKit compile:  2.26.4
WebKit run:      2.26.4
GTK compile:     3.24.13
GTK run:         3.24.13
libsoup compile: 2.68.3
libsoup run:     2.68.3
Extension dir:   /nix/store/syvjd21blzwfirpxnaf1kd7qi3yfl7ph-vimb-3.6.0/lib/vimb
pjones commented 4 years ago

I finally got around to testing this with the latest vimb commit and it seems to be fixed there.

@fanglingsu can we get a new release?

fanglingsu commented 4 years ago

@pjones nice to hear that it works for you now. But the only commit I can think that it fixed the issue could be related to #600. I'll try to prepare the next release soon.