Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix ReferenceError: "TouchEvent is not defined" in Firefox #43

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

Open
psiegel404 wants to merge 1 commit into IsraelZablianov:master
base: master
Choose a base branch
Loading
from psiegel404:patch-1

Conversation

@psiegel404
Copy link

@psiegel404 psiegel404 commented Feb 11, 2020

In Firefox a ReferenceError: "TouchEvent is not defined" is thrown. This commit fixes it by simply inserting "window.TouchEvent && " into the if-check in line 206

quantrung9 and NikitchenkoSergey reacted with thumbs up emoji
In Firefox a ReferenceError: "TouchEvent is not defined" is thrown. This commit fixes it by simply inserting "window.TouchEvent && " into the if-check in line 206
Copy link
Author

psiegel404 commented Feb 11, 2020
edited
Loading

It seems like there is another problem in firefox I couldn't figure out yet. In Chrome & Edge the dragging works correctly by holding the left mouse button down and the dragging stops as soon as someone stops pressing the mouse button.
In Firefox you first have to hold the mouse button and drag the draggable element, the element moves a few pixels then stops. As soon as you stop pressing the mouse button you're able to drag the element like you wish. To stop dragging the element you have to do a click with your mouse button. Would be nice if that could be fixed. I don't know if I can do that myself.

Copy link

@kurtjmeyoung I also have this problem

Copy link

@IsraelZablianov please, merge PR

EstebanFuentealba reacted with thumbs up emoji

Copy link

It seems like there is another problem in firefox I couldn't figure out yet. In Chrome & Edge the dragging works correctly by holding the left mouse button down and the dragging stops as soon as someone stops pressing the mouse button.
In Firefox you first have to hold the mouse button and drag the draggable element, the element moves a few pixels then stops. As soon as you stop pressing the mouse button you're able to drag the element like you wish. To stop dragging the element you have to do a click with your mouse button. Would be nice if that could be fixed. I don't know if I can do that myself.

This is in fact a issue for Firefox.
I will see if I can make sense of it.

psiegel404 and savrik85 reacted with thumbs up emoji

Copy link

cmcleese commented Nov 5, 2020

Im not the maintainer of this repository.
I have not found any solution directly related to this unfortunately.

savrik85 reacted with confused emoji

Copy link

There is a compatibility problem, why so many people still use it,
image

Copy link

@IsraelZablianov good boy, merge it!

Copy link

Ruinevo commented May 31, 2021
edited
Loading

It seems like there is another problem in firefox I couldn't figure out yet. In Chrome & Edge the dragging works correctly by holding the left mouse button down and the dragging stops as soon as someone stops pressing the mouse button.
In Firefox you first have to hold the mouse button and drag the draggable element, the element moves a few pixels then stops. As soon as you stop pressing the mouse button you're able to drag the element like you wish. To stop dragging the element you have to do a click with your mouse button. Would be nice if that could be fixed. I don't know if I can do that myself.

A bug in firefox related to this attribute:
image

i just deleted it and attached to a custom flag in my class:

		if (!initialized) {
			el.removeEventListener("mousedown", (el as any)["listener"]);
			handler.addEventListener("mousedown", moveStart);
			el.removeEventListener("touchstart", (el as any)["listener"]);
			handler.addEventListener("touchstart", moveStart, { passive: false });
			// handler.setAttribute("draggable", "true");
			(el as any)["listener"] = moveStart;
			initializeState();
			handlePositionChanged();
		}

Work for me in Chrome, Safari and Firefox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /