hazuki0x0 / YuzuBrowser

Customizable browser for android
Apache License 2.0
319 stars 96 forks source link

Focus is not on page after performing an action that changes the tab #212

Open StOrmCatz opened 3 years ago

StOrmCatz commented 3 years ago

Describe the bug The page area is not in focus after a performing an action that changes the tab such as: Move to left tab, Move to right tab, Close tab, New tab

After performing actions such as those above, if a page up/down key is sent to the browser (via a keyboard or virtual keyboard) for example, the keyboard key doesn't do anything. However, once you tap anywhere in the loaded web page area and again send the keyboard key, it will be accepted and performed. Note that the page is correctly in focus and it is responsive to keyboard keys until an action is performed to change the tab

To Reproduce Steps to reproduce the behavior:

  1. Load any page in tab 1
  2. Load any page in tab 2
  3. Switch to tab 2 by performing action: Move to right tab
  4. Send page up/down key to the browser via a keyboard or virtual keyboard (issue here, nothing occurs or no action in browser)
  5. Tap anywhere on the loaded page for tab 2
  6. Send page up/down key key again to the browser via a keyboard or virtual keyboard (action now correctly occurs on the page)

I've noticed that after doing steps 1-3, if you change app and switch back to YuzuBrowser the page is correctly in focus again.

Expected behavior The page is focused after performing an action that changes the tab so that any keys that are submitted to the browser via a keyboard or virtual keyboard would be accepted without needing to manually tap on the page area first to focus it again.

Device information (please complete the following information):

StOrmCatz commented 3 years ago

I have fixed this issue and will look at what is needed to commit the change. In the meantime, if anyone would like to get my updated version it can be found in the mentioned/referenced thread.