-
-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android Navigation Back gesture activates buttons on dashboard #3565
Comments
I do not have this issue on my Pixel 4 XL on both android 11 and 12 do you see this issue in Chrome for Android? The apps that you mention are not webview apps so are not a fair comparison. Also check that Android system webview and Chrome are both up to date. Disable any and all custom cards as well to see if those cause an issue. |
issue is not present in Chrome. WebView & Chrome Version: 94.0.4606.85 Intresstingly the issue only seems to be there if I use the back gesture from the right side of the phone --> a back swipe from the left side is working as it should be. Furthermore, I also noticed that i do not actualy have to lift the finger in most cases --> just tracing over the button is activating it. |
What do you mean by activate? Just that the button highlights? Is it only on those button cards? What about entity card? |
Checked: |
Ok then yes this is definitely a frontend issue and not an app issue |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
This issue is present with 2021.12.10. |
I've noticed this as well. My phone did just update to andriod 12 recently but also home assistant did an update as well. I'm gonna roll back to last month or so and see if the problem persist. This is what happens to me. I swipe up and the button I'm on in home assistant or light whatever will turn on or off like i clicked it but also andriod will go home or back whatever gesture I did. |
I have this issue and it is quite frustrating. I've turned on the lights on sleeping roommates more than once because of it. Oops. |
Also having this issue on pixel 5 on Android 12. Really frustrating - hopefully can be fixed soon! |
Same here, Samsung S20 , Android 12 |
Any update? |
I've researched a bit and this seems to be relevant: https://developer.android.com/training/gestures/gesturenav While the link to Once we are able to get the insets, the question is how to implement it: a. Implement it in the companion app. This would probably mean the app would have to reduce the size of the WebView. |
@v6ak the back from the left does work as intended. Only the back gesture on the right side is problematic. It means there is an implementation in place, only partial, doesn't it? |
Well, this might be purely accidental. If a margin is wide enough for
whatever reason, it should be OK. It seems that left margin is a bit wider
than the right one. Anyway, it doesn't imply the implementation is correct
– the required and actual margins might vary by device, settings etc. So,
it might break on some other device, new Android version etc.
I've also seen that the safe insets are available in CSS, so there is no
need to pass them from the companion app:
https://developer.mozilla.org/en-US/docs/Web/CSS/env
|
Still an issue in Android 13 and still really annoying. |
It's even worse on Samsungs three button gestures. All gesture types trigger a click. |
@Tau-Neutrino your photos link is broken. |
Just want to add that I experience this consistently in Android 13 on a Google Pixel 6a. It has turned off my heat on a few occasions, which has the potential to lead to frozen and burst pipes in the winter. The two places I know for sure it has happened is on an entities card with light toggles and on a mushroom thermostat card. |
Hello! We are also experiencing this bug and it's very frustrating! |
Same issue here with my Samsung Android phone. Very often, when I try to close the app with swiping up from the bottom, I accidentally turn on/off some lights or open/close blinds. Often times I don't even realize it. This is very frustrating. This does not happen when I use Home Assistant in Chrome on my Android, just in the Home Assistant Android app. |
I can also confirm that this is an issue of the HA app. When navigating back in chrome, no HA buttons will be pressed. In the HA app I toggle buttons all the time when swiping back. |
This also impacts the burger side bar menu (3 lines in the top left). it should be possible to swipe diagonally from the left screen edge to open the side bar menu however this doesn't work in the HA app on Android |
Yes, thank you, @venator85! I didn't have |
You don't need the two lines starting with |
This just changed sides for me: it was problematic on the right. It now is on the left side. I upgraded to Android 14, in case it matters. |
This is still an issue. Affects both type: button and type: custom:button-card . But it does not affect other types of cards eg entity-switches do not get toggled when I perform the back gesture over them. Since other cards work correctly that should mean that it is fixable for the button card, no? |
Sadly doesn't work on bottom swipes if the page is longer than the device view. |
As mentioned earlier (see
#3565 (comment)
), it seems to be WebView's feature, not a bug.
… Message ID: ***@***.***>
|
Same here. Actually, the problem has reappeared on both sides for me, even though I have additional margins added. Screen recording: screen-20231205-160819.2.mp4
The way I read the subsequent replies is that other webviews don't manage it this way, so it does seem to be specific to Home Assistant. |
As said in my earlier comment (#3565 (comment)), the issue can be reproduced in both chrome and in the home assistant app. I believe that the 'touchcancel' event is just handled incorrectly in the home assistant frontend |
I'm wondering why the cards listen to three different events ( As far as I understand the problem, the issue comes from the
I haven't tested this, it's just a conjecture. Maybe it's better to just use the |
That's what I was thinking too, is there any reason to listen to |
The action doesn't actually seem to trigger during Why does When Android starts the special Back Gesture action, does it send a |
I didn't look into the source, but can't we just look at the implementation of other cards? Most handle it correctly, for me it's just the button card that's triggered falsely |
I have just done some local testing. Android does send |
@Ongion any more updates? Assuming things are still working well, are you going to open a PR? |
Just to bumb this thread again: The 'tile' card has this issue too |
@itpeters So far I haven't had any issues. I'll look into opening a PR with this change, though it may take a bit to get my development environment set up again. |
So, I have a change that I believe would fix this, but I haven't been able to figure out how to run the test suite for frontend in my dev environment. I feel like that's probably a requirement for the PR. I'm going to try to figure this out, but if anyone who has developed for frontend before thinks they can get it done sooner, here's the commit from my fork. |
Hi, can you give us instructions on how to manually insert the change in HA OS? I can't find the file via SSH or File Editor. |
I was never able to actually test it on the base HomeAssistant frontend
controls. When I first encountered this issue, it was with the Custom
Button Card entity, which apparently copied or forked this code from
HomeAssistant.
With that custom control, I was able to manually add this fix, and it
worked as I would expect. But I'm not sure where you'd make this change for
a base HomeAssistant install. Presumably it's packed together with the rest
of frontend.
…On Sun, Jan 28, 2024, 3:57 AM parkkralle ***@***.***> wrote:
Hi, can you give us instructions on how to manually insert the change in
HA OS? I can't find the file via SSH or File Editor.
—
Reply to this email directly, view it on GitHub
<#3565 (comment)>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZDWBRU2MV57WADRI2BZOLYQYHI5BFKMF2HI4TJMJ2XIZLTSSBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLAVFOZQWY5LFVIYTGMBQGE3DKMJXG2SG4YLNMWUWQYLTL5WGCYTFNSWHG5LCNJSWG5C7OR4XAZNMJFZXG5LFINXW23LFNZ2KM5DPOBUWG44TQKSHI6LQMWVHEZLQN5ZWS5DPOJ42K5TBNR2WLKJRG44TAMBYGE3THAVEOR4XAZNFNFZXG5LFUV3GC3DVMWVDCNZTGU4TCNBTGQ2YFJDUPFYGLJLMMFRGK3FFOZQWY5LFVIYTGMBQGE3DKMJXG2TXI4TJM5TWK4VGMNZGKYLUMU>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
|
Motorola Edge 30 Neo. Android 13. Home Assistant Core 2023.12.4. Home Assistant Operating System 11.2. I confirm, swiping up will click the items at the bottom of the dashboard. Doesn't occure when I'm using HA in Chrome. Doesn't occure on other apps I'm using. |
How has your testing of this gone? It's like having a ghost in our house with us all being on androids that use the back gesture. Does this fix it and if so, can a PR be created? It's amazing to me that such a glaring UX bug has been present for so long and it doesn't seem to generate any noise! |
Any updates on this? Adding a 40px margin on both sides does work but we are losing some valuable space. |
I have tested the change from this commit and it fixes swiping back on a tile triggering the "tap" behaviour for me. I tested with a Pixel 7 running Android 15 with Home Assistant app version 2024.10.3-full. Before: https://github.com/user-attachments/assets/5a4aedd0-7013-47e3-9dda-77a66aedfd6c After: https://github.com/user-attachments/assets/a2fcc3f4-1fd9-4de3-a03e-25b3057c8262 |
Shoutout to @mattyway for fixing this! |
Home Assistant Android version:
2021.10.0-full
Android version:
Android 12 (SPA1A.210812.015)
Phone model:
Pixel 4a
Home Assistant version:
core-2021.10.6
Last working Home Assistant release (if known):
all affected
Description of problem:
The android back gesture seems to activate the button which is present below the trace of the finger while performing the gesture (on finger lift-off).
This is not the case for other apps i tested (e.g outlook, twitter, calculator, etc), therefore it seems to be an issue with the app.
Screenshot of problem:
Here is a screen record, which shows the issue (around 5 sec at the shield icon, which triggers the error message on the bottom):
https://photos.app.goo.gl/BT5ZShqgiFELMuxn7
The text was updated successfully, but these errors were encountered: