uazo / cromite

Cromite a Bromite fork with ad blocking and privacy enhancements; take back your browser!
https://www.cromite.org/
GNU General Public License v3.0
3.57k stars 86 forks source link

[Android] Touching physical fingerprint sensor scrolls to top of webpage with the keyboard protection active #1542

Open varaki opened 1 month ago

varaki commented 1 month ago

Preliminary checklist

Can the bug be reproduced with corresponding Chromium version?

No

Are you sure?

No

Cromite version

129.0.6668.90

Device architecture

arm64-v8a

Platform version

Android 14

Android Device model

Poco X3 Pro

Is the device rooted?

Yes

Changed flags

Doesn't matter, it happens without any flags changed too.

Is this bug happening in an incognito tab?

Yes

Is this bug caused by the adblocker?

No

Is this bug a crash?

No

Describe the bug

When opening any website then scrolling down a bit, then if you touch the physical fingerprint sensor, the webpage scrolls up to the top of the website.

Steps to reproduce the bug

  1. Open any website
  2. Scroll down
  3. Touch fingerprint sensor

Expected behavior

Touching the fingerprint sensor should not have any effect on the browser.

Screenshots

No response

varaki commented 1 month ago
Details

https://github.com/user-attachments/assets/34f283a7-60f3-45ef-ae0d-be0858aa6cbf

uazo commented 1 month ago

um... complex issue.

I must ask you to do some tests:

varaki commented 1 month ago

Yeah, as I mentioned it happens on any site. It does not happen with vanilla chromium. Tested with versions back until and including v128.0.6613.120-c609027f1a1a0961bb668668edd866e741579109 It happens in every version. I can maybe go even further back. I think version 128 was the last one I was using on this phone but with Android 13 and the problem was not there. I think it might have to do something with the Android version combined with Cromite. One additional thing is that if I log in with Bitwarden after unlocking the vault with fingerprint, then sometimes the sites's scrolling stuck as if I was constantly pressing the fingerprint sensor. This particular issue goes away if I touch the fingerprint sensor again. Weird, but at least I have this workaround. I don't know how to actually debug and get what actually happens under the hood, when it happens.

uazo commented 1 month ago

do you use a stock android or a particular distribution?

varaki commented 1 month ago

I forgot to mention, it's not stock android, it's crDroid. It might worth a shot mentioning the issue there as well.

uazo commented 1 month ago

It might worth a shot mentioning the issue there as well.

if you can, please post the link, thank you.

varaki commented 1 month ago

It might worth a shot mentioning the issue there as well.

if you can, please post the link, thank you.

https://github.com/crdroidandroid/issue_tracker/issues/535

uazo commented 1 month ago

I ask you to do some more tests, but you need a PC and to open the developer tools:

  1. Open chrome://user-actions/ that page tracks all UI events made by the user in chromium. if you can, send us the log

  2. Connect the device to the PC and open chrome://inspect/#devices in the javascript console run: monitorEvents(window) this logs all events of the javascript window object.

let's see if we can figure this out

varaki commented 1 month ago

Using the android browser logging shows nothing when touching the fingerprint reader, it does not register as any kind of user action, i'm gonna try PC vs Phone approach, but I highly doubt it will show anything useful...

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale as there has been no recent activity in response to our request for more information. Please respond so that we can proceed with this issue.

varaki commented 4 weeks ago

I did the console log, it seems like touching the fingerprint sensor registers as Home button key press:

"(unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keyup KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …}"

Details

``` (unknown) touchmove TouchEvent {isTrusted: true, touches: TouchList, targetTouches: TouchList, changedTouches: TouchList, altKey: false, …} (unknown) touchmove TouchEvent {isTrusted: true, touches: TouchList, targetTouches: TouchList, changedTouches: TouchList, altKey: false, …} (unknown) touchmove TouchEvent {isTrusted: true, touches: TouchList, targetTouches: TouchList, changedTouches: TouchList, altKey: false, …} (unknown) touchmove TouchEvent {isTrusted: true, touches: TouchList, targetTouches: TouchList, changedTouches: TouchList, altKey: false, …} (unknown) touchmove TouchEvent {isTrusted: true, touches: TouchList, targetTouches: TouchList, changedTouches: TouchList, altKey: false, …} (unknown) touchmove TouchEvent {isTrusted: true, touches: TouchList, targetTouches: TouchList, changedTouches: TouchList, altKey: false, …} (unknown) scroll Event {isTrusted: true, type: 'scroll', target: document, currentTarget: Window, eventPhase: 3, …} (unknown) touchmove TouchEvent {isTrusted: true, touches: TouchList, targetTouches: TouchList, changedTouches: TouchList, altKey: false, …} (unknown) touchend TouchEvent {isTrusted: true, touches: TouchList, targetTouches: TouchList, changedTouches: TouchList, altKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) scroll Event {isTrusted: true, type: 'scroll', target: document, currentTarget: Window, eventPhase: 3, …} (unknown) keyup KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keyup KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keyup KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keyup KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keydown KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) keyup KeyboardEvent {isTrusted: true, key: 'Home', code: 'Home', location: 0, ctrlKey: false, …} (unknown) pointerover PointerEvent {isTrusted: true, pointerId: 13, width: 0, height: 0, pressure: 1, …} (unknown) pointerdown PointerEvent {isTrusted: true, pointerId: 13, width: 0, height: 0, pressure: 1, …} ```

uazo commented 4 weeks ago

try using a different keyboard.

varaki commented 4 weeks ago

try using a different keyboard.

it does not matter what keyboard I use, the same thing happens when using the default AOSP keyboard, AnySoftKeyboard or with Heliboard as well.

uazo commented 4 weeks ago

you can try disabling the System keyboard protection (Cromite flag) flag in chrome:/flags/cromite?

varaki commented 4 weeks ago

you can try disabling the System keyboard protection (Cromite flag) flag in chrome:/flags/cromite?

I did and the problem is now gone :) Thanks. By the way, could this system keyboard protection setting cause that on some web forms I could not type Hungarian accented characters like á,é,ő,ú?

uazo commented 4 weeks ago

actually, the patch is useless in android because the android virtual keyboard sends the characters without giving usable fingerpriting information. is needed in desktop platforms.

since I don't have a physical keyboard available to be connected to the device for a verification, I left the flag on as a precaution. It is a pity that I cannot reproduce the problem, otherwise I would have fixed it.

uazo commented 4 weeks ago

on some web forms I could not type Hungarian accented characters like á,é,ő,ú?

theoretically not. does this happen to you?

varaki commented 4 weeks ago

on some web forms I could not type Hungarian accented characters like á,é,ő,ú?

theoretically not. does this happen to you?

It happened in the past, but I don't remember on which sites and I don't want to hijack this thread, so lets ignore this 😃