cypherpunkengineering / cypherpunk-vpn-desktop

Cypherpunk Privacy VPN app for Windows / MacOS / Linux
Other
0 stars 0 forks source link

Keyboard tabbing is broken #58

Open nikuhodai opened 7 years ago

nikuhodai commented 7 years ago

After we stopped using modal

elements to shield away unrelated sections of the DOM from user interaction (it was hard to adjust the visual appearance since they live in their own top layer), we need some way to accomplish the same effect, otherwise:

  1. Open the account panel
  2. Hit the 'tab' key
  3. Focus jumps to the connect button (or any other element with a tabIndex), which will force the current container to scroll it into view, breaking layout

The future 'inert' attribute will let us accomplish all this in a clean way, until then we rely on CSS pointer-events: none, but this has drawbacks (click-through) and leaves keyboard tabbing unhandled. We would have to go through all elements with an explicit or implicit tabIndex attribute and set them all to -1 if they're outside the active DOM, which is an ugly and eventually unneeded workaround.

For now (i.e. initial beta launch), we will simply disable the 'tab' key on the main screen. This breaks keyboard navigation, but is preferable to a very buggy keyboard navigation. We'll come back later (hopefully before final release) and improve this depending on user reaction.