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

Fix reference to TouchEvent which is not defined in Firefox #1001

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

kiasyn
Copy link
Contributor

@kiasyn kiasyn commented Jan 30, 2025

Description

Fixes issue #1000

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Motivation and context

drag does not work on Firefox

How to test?

Screenshots (if appropriate)

Checklist

  • If my change requires a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

Copy link

github-actions bot commented Jan 30, 2025

Hi there @kiasyn, thank you for this contribution! 👍

While we wait for the team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:

  • It's clear what problem this is solving, there's a connected issue or a description of what the changes do and how to test them
  • The automated tests all pass (see "Checks" tab on this PR)
  • The level of security for this contribution is the same or improved
  • The level of performance for this contribution is the same or improved
  • Avoids creating breaking changes; note that behavioral changes might also be perceived as breaking
  • If this is a new feature, Umbraco HQ provided guidance on the implementation beforehand
  • 💡 The contribution looks original and the contributor is presumably allowed to share it

Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution.

If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@bjarnef
Copy link
Contributor

bjarnef commented Feb 3, 2025

It should be supported in Firefox: https://caniuse.com/?search=TouchEvent

https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent

Works fine to me:
image

@kiasyn
Copy link
Contributor Author

kiasyn commented Feb 3, 2025

@bjarnef hmm is there some more information I can provide? doesn't work on https://uui.umbraco.com/?path=/docs/uui-color-area--docs for me still has the issue. Do you have a touch device connected to your computer?
There is this open bug https://bugzilla.mozilla.org/show_bug.cgi?id=1693172

@bjarnef
Copy link
Contributor

bjarnef commented Feb 3, 2025

It works in on desktop in emulator simulating touch event in Firefox and on Firefox for Android.

Any specific Firefox version and OS?

@kiasyn
Copy link
Contributor Author

kiasyn commented Feb 3, 2025

Firefox 134.0.2 on Windows 11 Pro Build 26100
Firefox 134.0.2 on Windows 10 Pro Build 19045
both desktops so no touch devices.
works on Firefox on my android
It doesn't work on devices that don't have touch, so you need to not be simulating touch events

@bjarnef
Copy link
Contributor

bjarnef commented Feb 3, 2025

Okay, the example here wasn't using emulator though.
#1001 (comment)

Strange enough, because I have same version:
Firefox 134.0.2
Windows 10.0.19044 Build 19044

@kiasyn
Copy link
Contributor Author

kiasyn commented Feb 3, 2025

do you have any touch points detected on https://www.whatismybrowser.com/ ? I have 0 detected there

@bjarnef
Copy link
Contributor

bjarnef commented Feb 3, 2025

do you have any touch points detected on https://www.whatismybrowser.com/ ? I have 0 detected there

It shows 1 at Maximum Touch Points in Firefox, but 0 in Chrome.

@iOvergaard iOvergaard added bug Something isn't working community/pr labels Feb 13, 2025
@iOvergaard iOvergaard merged commit 338ca32 into umbraco:v1/contrib Feb 13, 2025
8 of 10 checks passed
@bjarnef
Copy link
Contributor

bjarnef commented Feb 13, 2025

@iOvergaard I would update this comment as TouchEvent is available in Firefox 😅

Strange I couldn't reproduce in exact same version of Firefox.

@iOvergaard
Copy link
Contributor

@bjarnef I could reproduce it in Firefox as well on my MacOS, so may be hardware-dependent. Anyway, the fix does not hurt anything - if the TouchEvent is present then that will be used.

@bjarnef
Copy link
Contributor

bjarnef commented Feb 13, 2025

@iOvergaard yes, I just mean the comment is misleading as TouchEvent is supported in Firefox and officially mentioned.
Not sure why it isn't on some OS though.

https://caniuse.com/?search=TouchEvent

https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community/pr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants