Hints don't show for tiny inputs (react-select)
I'm using react-select on a site we're building and for some reason none of the inputs are fable. It uses a regular non-readonly not-disabled not-hidden input.
I finally tracked this down mystery: https://github.com/philc/vimium/blob/17fb86e02971948f90215934cbe5417674364a29/lib/dom_utils.coffee#L124 - apparently vimium mandates that inputs must be at least 3px wide? However, the react-select lib hard codes its input to be just 2px wide (and via an inline-style) 😞
Is there any reason for this 3px mandate? Could we reduce it to 2? Or 1? Or maybe make it based on the area? Or if there's a really good reason for this, should I go bring up an issue over in the react-select repo?
I can not find which line the 2px is from in source code of React Select, but as far as I find, the width in real world may be 5px (https://jedwatson.github.io/react-select/), 2px (https://react-select.com/styles) and 1px (https://github.com/JedWatson/react-select/blob/master/src/internal/DummyInput.js#L21).
So maybe Vimium needs looser checks, or we have to wait React Select to change its design.
What's the reasoning behind vimiums current approach? Looser vimium checks seem like the best idea, 3px seems pretty arbitrary, but perhaps there's a good reason for this that I don't know about.
I find the 3px limit is from https://github.com/philc/vimium/commit/99848a6dedfda243f02f4544ed309f8d4f869f1c .
Interesting. Are there any measurements of this "performance problem"? At a cursory glance, it feels a little dubious, especially since getBoundingClientRect isn't very performant itself, I would guess that's what makes this method slow.
In my opinion, the intention of w >= 3 && h >= 3 is to exclude those decorative UI elements which may be mistakenly recognized as "clickable" by Vimium.
Would a special green light for tiny <input>s be enough? Example: require its width >= 1 and height >= 8.
This issue is still happening to this day and it's happening with all size of Select components of react-select (6 years after), I've tried other extensions like SurfingKeys and they don't have this problem. @philc can we have any updates on this?