Skip to content
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

click count is not correct on web #1464

Closed
cmyr opened this issue Dec 14, 2020 · 1 comment · Fixed by #1465
Closed

click count is not correct on web #1464

cmyr opened this issue Dec 14, 2020 · 1 comment · Fixed by #1465
Assignees
Labels
shell/web concerns the web backend

Comments

@cmyr
Copy link
Member

cmyr commented Dec 14, 2020

Playing around a bit with building for wasm, I notice that doubleclicks are not correctly reported.

@cmyr cmyr added help wanted has no one working on it yet shell/web concerns the web backend labels Dec 14, 2020
@cmyr
Copy link
Member Author

cmyr commented Dec 14, 2020

And digging in a bit deeper, I see why. There's no 'clickcount' reported via the [MouseEvent], and the web api's support 'doubleclick' as a separate event, and that (like click) is only reported after mouseup. In order to know the clickcount during mousedown, we'll have to keep our own timer; but this will be fraught because (as far as I know) there's no way from the browser to determine what the user's 'click interval' is, and it could fall within a wide range.

So: I think the best option here is to hard-code some value that is a compromise, and deal with that?

@cmyr cmyr removed the help wanted has no one working on it yet label Dec 14, 2020
@cmyr cmyr self-assigned this Dec 14, 2020
cmyr added a commit that referenced this issue Dec 14, 2020
This lets us 'correctly' report click-count for mouse events on wasm.
Doing this 'actually correctly' would require finding some way
to determine what the user's current doubleclick delay is, and I
do not believe this is exposed by browsers, although I haven't looked
too hard and it wouldn't blow my mind?

- closes #1464
cmyr added a commit that referenced this issue Dec 14, 2020
This lets us 'correctly' report click-count for mouse events on wasm.
Doing this 'actually correctly' would require finding some way
to determine what the user's current doubleclick delay is, and I
do not believe this is exposed by browsers, although I haven't looked
too hard and it wouldn't blow my mind?

- closes #1464
cmyr added a commit that referenced this issue Dec 14, 2020
This lets us 'correctly' report click-count for mouse events on wasm.
Doing this 'actually correctly' would require finding some way
to determine what the user's current doubleclick delay is, and I
do not believe this is exposed by browsers, although I haven't looked
too hard and it wouldn't blow my mind?

- closes #1464
cmyr added a commit that referenced this issue Dec 14, 2020
This lets us 'correctly' report click-count for mouse events on wasm.
Doing this 'actually correctly' would require finding some way
to determine what the user's current doubleclick delay is, and I
do not believe this is exposed by browsers, although I haven't looked
too hard and it is certainly possible.

- closes #1464
cmyr added a commit that referenced this issue Dec 16, 2020
This lets us 'correctly' report click-count for mouse events on wasm.
Doing this 'actually correctly' would require finding some way
to determine what the user's current doubleclick delay is, and I
do not believe this is exposed by browsers, although I haven't looked
too hard and it is certainly possible.

- closes #1464
cmyr added a commit that referenced this issue Dec 16, 2020
This lets us 'correctly' report click-count for mouse events on wasm.
Doing this 'actually correctly' would require finding some way
to determine what the user's current doubleclick delay is, and I
do not believe this is exposed by browsers, although I haven't looked
too hard and it is certainly possible.

- closes #1464
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shell/web concerns the web backend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant