Double tap on iOS #2015

Closed
opened 2023-02-25 16:57:55 +00:00 by danstewart · 9 comments

Description

Hi,

Is it intentional that some things need a two taps on iOS?

eg.

  • Projects in the side bar
  • Tasks in the list view

Vikunja Frontend Version

0.20.3

Vikunja API Version

0.20.2

Browser and version

Safari iOS 16.3.1

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

No response

### Description Hi, Is it intentional that some things need a two taps on iOS? eg. - Projects in the side bar - Tasks in the list view ### Vikunja Frontend Version 0.20.3 ### Vikunja API Version 0.20.2 ### Browser and version Safari iOS 16.3.1 ### Can you reproduce the bug on the Vikunja demo site? Yes ### Screenshots _No response_
danstewart added the
kind/bug
label 2023-02-25 16:57:55 +00:00
Author

I think it may be a CSS issue, I found this:
https://css-tricks.com/annoying-mobile-double-tap-link-issue/

As a lazy test I stripped out :hover from all of the CSS on my instance and it fixed the issue.

I'll get vikunja set up locally at some point and come up with a proper fix.

I think it may be a CSS issue, I found this: https://css-tricks.com/annoying-mobile-double-tap-link-issue/ As a lazy test I stripped out `:hover` from all of the CSS on my instance and it fixed the issue. I'll get vikunja set up locally at some point and come up with a proper fix.
Owner

It's not intentional.

It's not intentional.
Author

It's not intentional.

Great, I'll submit a fix when I get some time.

Looks like the issue is because the star button is shown on hover.
Was thinking on mobile it should just always be shown.

Let me know if you have a better suggestion.

Thanks

> It's not intentional. Great, I'll submit a fix when I get some time. Looks like the issue is because the star button is shown on hover. Was thinking on mobile it should just always be shown. Let me know if you have a better suggestion. Thanks
Owner

Looks like the issue is because the star button is shown on hover.
Was thinking on mobile it should just always be shown.

That sounds like it could work. I'd love a PR!

> Looks like the issue is because the star button is shown on hover. Was thinking on mobile it should just always be shown. That sounds like it could work. I'd love a PR!
Member

Seems like the way to do it now is to combine the queries:

@media(hover: hover) and (pointer: fine) {
	/* [...] */
}

See https://medium.com/@mezoistvan/finally-a-css-only-solution-to-hover-on-touchscreens-c498af39c31c

Support seems fine these days.

Seems like the way to do it now is to combine the queries: ```css @media(hover: hover) and (pointer: fine) { /* [...] */ } ``` See https://medium.com/@mezoistvan/finally-a-css-only-solution-to-hover-on-touchscreens-c498af39c31c Support seems fine these days.
Member

Digging a bit deeper: I'm a bit unsure how the the use tablets (especially iPads) together with stylus aka Apple Pencil changes this.

See also this thread that seems to keep track of these changes:
https://twitter.com/meduzen/status/1051542796954415107

Digging a bit deeper: I'm a bit unsure how the the use tablets (especially iPads) together with stylus aka Apple Pencil changes this. See also this thread that seems to keep track of these changes: https://twitter.com/meduzen/status/1051542796954415107
Author

Looks like for iPads with the apple pencil the hover check would be false then we would just show the star and overflow menu button, which seems fine to me.

Alternatively we could remove the hover entirely and just always show the star and overflow menu button, though I think the current design is nice on desktop.

I have a few devices I can test with (though not an iPad which supports the apple pencil) so I will add some notes of the various devices when I raise the PR.

Looks like for iPads with the apple pencil the hover check would be `false` then we would just show the star and overflow menu button, which seems fine to me. Alternatively we could remove the hover entirely and just always show the star and overflow menu button, though I think the current design is nice on desktop. I have a few devices I can test with (though not an iPad which supports the apple pencil) so I will add some notes of the various devices when I raise the PR.
Member

In some projects I also used this trick:

  1. I assume the device doesn't support touch. So we support hover initially.

  2. We have a general listener for touch events on the body with capture, once and passive set as true. If that listener is fired we add a class to the body that indicates touch support. We can use that class in links to check for support.

In some projects I also used this trick: 1) I assume the device doesn't support touch. So we support hover initially. 2) We have a general listener for touch events on the body with `capture`, `once` and `passive` set as `true`. If that listener is fired we add a class to the body that indicates touch support. We can use that class in links to check for support.
Owner

Alternatively we could remove the hover entirely and just always show the star and overflow menu button, though I think the current design is nice on desktop.

I think we should definitely keep that. Better remove it for devices like the ipad when so that it works most of the time and differently for ipads.

I have an ipad with a pencil and could test this. I wouldn't say that's high on the priority list though.

> Alternatively we could remove the hover entirely and just always show the star and overflow menu button, though I think the current design is nice on desktop. I think we should definitely keep that. Better remove it for devices like the ipad when so that it works most of the time and differently for ipads. I have an ipad with a pencil and could test this. I wouldn't say that's high on the priority list though.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#2015
No description provided.