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

Buggy Behavior of Time Picker - MouseMove Firing Bug in Windows (TouchPan.js) #10721

Closed
cyfung1031 opened this issue Sep 17, 2021 · 6 comments · Fixed by #10733
Closed

Buggy Behavior of Time Picker - MouseMove Firing Bug in Windows (TouchPan.js) #10721

cyfung1031 opened this issue Sep 17, 2021 · 6 comments · Fixed by #10733
Assignees
Labels
Qv1 Qv2 🔝 Quasar v2 issues

Comments

@cyfung1031
Copy link
Contributor

cyfung1031 commented Sep 17, 2021

https://quasar.dev/vue-components/time

Testing environment: Windows PC with Edge / Chrome (Blink Engine)

To reproduce:

  1. Pointerdown at the clock number
  2. Hold the pointer without releasing and waiting for the "Drag" cursor
  3. Release

Expected Behavior:
Same as a click action to change to next value (hour -> minute -> second)

Buggy Behavior:
No switching among hour, minute and second.

If the user does not perform a fast clicking (a little time holding the click), it is 50% to have such experience.

f8c9ce18-3d7b-4ba5-877e-e34d67b30047-00 00 25 409-00 00 56 847

@cyfung1031 cyfung1031 added the Qv2 🔝 Quasar v2 issues label Sep 17, 2021
@metalsadman
Copy link
Member

can't reproduce Microsoft Edge Version 93.0.961.52 (Official build) (64-bit).

@cyfung1031
Copy link
Contributor Author

cyfung1031 commented Sep 18, 2021

can't reproduce Microsoft Edge Version 93.0.961.52 (Official build) (64-bit).

@metalsadman

Coding Issue in TouchPan.js

I found the coding problem is in TouchPan.js

image

it use clientX and clientY for the movement detection of touchpan.

In Windows 7 64bit OS Blink Engine, the movement can still trigger even there is no movement.

Therefore move( evt ) will be triggered by the native MouseEvent.
Since absX !== absY is always false, either ctx.move and ctx.end will not proceed.

This is confirmed as this issue disappears after adding the following coding:


onMounted(() => {

    document.body.addEventListener('mousedown', function(evt) {
        let p = evt.target.closest('.q-time__clock.cursor-pointer.non-selectable');
        if (p) {

            requestAnimationFrame(() => {

                document.documentElement.dispatchEvent(new MouseEvent('mousemove', {
                    clientX: evt.clientX + 1,
                    clientY: evt.clientY + 1
                }))
            })

        }

    }, true)


})

Suggested Solution

It might add some coding to skip the move if the clientX and clientY is the same as mousedown event.

amkscmsdkmck

CodePen Demo:

https://codepen.io/cyfung1031/pen/RwgQzNE
https://codepen.io/cyfung1031/full/RwgQzNE
3a1c699c-118b-41a7-aeb1-32e09e2a2541

Relevant Blink Bug Reports:
https://bugs.chromium.org/p/chromium/issues/detail?id=161464
https://bugs.chromium.org/p/chromium/issues/detail?id=721341

@cyfung1031 cyfung1031 changed the title Buggy Behavior of Time Picker when the interaction is between a click and a drag Buggy Behavior of Time Picker - MouseMove Firing Bug in Windows (TouchPan.js) Sep 18, 2021
@pdanpdan
Copy link
Collaborator

The main problem is we cannot find a browser that can reproduce it.

pdanpdan added a commit to pdanpdan/quasar that referenced this issue Sep 18, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
@pdanpdan pdanpdan added the Qv1 label Sep 18, 2021
@pdanpdan
Copy link
Collaborator

Because I don't have a browser to reproduce it I need someone to test at https://pdanpdan.github.io/quasar-docs/vue-components/time#basic and report if it's fixed.

@pdanpdan pdanpdan reopened this Sep 18, 2021
@cyfung1031
Copy link
Contributor Author

Because I don't have a browser to reproduce it I need someone to test at https://pdanpdan.github.io/quasar-docs/vue-components/time#basic and report if it's fixed.

Yes. It works for both Edge and Chrome. The pseudo mousemove event immediately after mousedown is eliminated.
71cc77e2-1c72-47b6-9a44-569d3ce2ae26

According to the bug reports in chromium.org, this bug would only occur in Windows OS but not in every Windows machine.
They just close the file because reproduction is limited to some machines....

As for record, my computer environment is

  • Windows 7 SP1 x64 Ultimate 6.1.7601 SP1
  • Microsoft Edge 93.0.961.52 (Official Build) x64
  • Google Chrome 93.0.4577.82 (Official Build) x64

pdanpdan added a commit to pdanpdan/quasar that referenced this issue Sep 22, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Sep 24, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Sep 27, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
@rstoenescu rstoenescu self-assigned this Oct 12, 2021
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Oct 13, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Oct 14, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
rstoenescu pushed a commit that referenced this issue Oct 15, 2021
) (#10733)

* fix Windows' link Engine

* Fix Windows's Blink Engine Bug

windows OS's bug for mousemove event (Blink Engine - Chrome & Edge)
mousemove event occurs even there is no movement after mousedown

https://bugs.chromium.org/p/chromium/issues/detail?id=161464
https://bugs.chromium.org/p/chromium/issues/detail?id=721341
#10721
@rstoenescu
Copy link
Member

@cyfung1031 Thanks for your great contribution (reporting and also PRing)!
And thanks to all participants!

Pushed PR and one more commit to polish some things.
Fix will be available in Quasar v2.1.4

pdanpdan added a commit to pdanpdan/quasar that referenced this issue Oct 30, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Nov 5, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Nov 5, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Nov 5, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Dec 1, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Dec 6, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Dec 8, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Dec 9, 2021
… of synthetic event generated when detection auto starts but there is no move quasarframework#10721

quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Nov 14, 2022
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Nov 23, 2022
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Dec 16, 2022
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Dec 18, 2022
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Jan 5, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Jan 8, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Jan 10, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Jan 11, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Jan 15, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Jan 16, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Jan 19, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Feb 7, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Feb 15, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Mar 1, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Mar 2, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Mar 9, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Mar 17, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Mar 17, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Mar 17, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Mar 21, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Mar 21, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Mar 31, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Apr 4, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Apr 27, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue May 4, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue May 5, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue May 12, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Sep 4, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Sep 8, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
pdanpdan added a commit to pdanpdan/quasar that referenced this issue Oct 21, 2023
…thetic event generated when detection auto starts but there is no move quasarframework#10721
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Qv1 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants