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

FireFox occasionally redirects to "arbitrary.com" #450

Closed
pfriedl opened this issue Aug 3, 2018 · 4 comments · Fixed by #451
Closed

FireFox occasionally redirects to "arbitrary.com" #450

pfriedl opened this issue Aug 3, 2018 · 4 comments · Fixed by #451
Labels
bug help wanted info needed More info needs to be provided to discuss/solve the issue

Comments

@pfriedl
Copy link

pfriedl commented Aug 3, 2018

I'm opening this issue because:

After dragging and dropping table rows, FireFox triggers a search for "arbitrary", which automatically redirects to arbitrary.com

supporting information:

  • I use sortable version: 0.9.3
  • I tested in the following browser (incl. versions): FireFox 61.0.1 64 bit
  • Windows, OS X/macOS, or Linux?:### How can the issue be reproduce the problem? Windows 10, MacOS
    Please add a complete description of how to reproduce the problem.

I've got a table of data and making the rows sortable. In FireFox, after about 10 drag and drops, FireFox immediately triggers a search for "arbitrary" and automatically redirects to arbitrary.com

I believe this issue is related to line 458 of html5sortable.js:
event.dataTransfer.setData('text/plain', 'arbitrary');

@lukasoppermann lukasoppermann added bug help wanted info needed More info needs to be provided to discuss/solve the issue labels Aug 3, 2018
@lukasoppermann
Copy link
Owner

Related to #420 I actually have no idea how to fix it. If you have any insight, please send a PR.

@ericparshall
Copy link
Contributor

In case anyone is interested, I have been able to stop this from happening by changing:

event.dataTransfer.setData('text/plain', 'arbitrary');

to this:

event.dataTransfer.setData('text/plain', event.target.id);

I will try to get a PR for this but I haven't used TypeScript before, so it may take a while.

@lukasoppermann
Copy link
Owner

Hey @ericparshall, thank you, looking forward to the PR. I think TypeScript should not provide an issue for this change at all. At this point its only vanilla JS. If you need any help, please let me know.

@ericparshall
Copy link
Contributor

Thanks for reminding me @lukasoppermann. The tricky part for me was getting the mock DragEvent to have target object so the tests would pass. Please let me know if there is anything I need to change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted info needed More info needs to be provided to discuss/solve the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants