Skip to content

Firefox 49.0.2 drag and drop will open a new TAB #985

@EagleChinaWu

Description

@EagleChinaWu

http://rubaxa.github.io/Sortable/

Firefox 49.0.2 The default opens the drag and drop gesture,drag and drop will open a new TAB;

Activity

changed the title [-]http://rubaxa.github.io/Sortable/ Firefox 49.0.2 drag and drop will open a new TAB[/-] [+]Firefox 49.0.2 drag and drop will open a new TAB[/+] on Oct 25, 2016
CatoTH

CatoTH commented on Oct 29, 2016

@CatoTH

I had some other issues with Sortable.js and Firefox 49. Text Input Fields inside a sortable element were not selectable anymore.

In my case, I could fix it by removing / commenting out the following line:
dragEl.style['will-change'] = 'transform';

Maybe it's the same issue and this workaround works for you as well?

EagleChinaWu

EagleChinaWu commented on Nov 3, 2016

@EagleChinaWu
Author

Sortable working fine on jquery-sortable but No jQuery Firefox open a new tab, No jQuery there is no quick solution?

ruoyu133

ruoyu133 commented on Nov 15, 2016

@ruoyu133

i also met。firefox49.0.2 。I removed dragEl.style['will-change'] = 'transform'; but it is not ok。

xuanskyer

xuanskyer commented on Dec 15, 2016

@xuanskyer

same Q.

amhoho

amhoho commented on Dec 20, 2016

@amhoho

also

ghost

ghost commented on Jan 9, 2017

@ghost

I have the same Q too.It's a firefox drag feature, not a bug. You can disable it by settings.
looked at about:addons

Roamin

Roamin commented on Feb 27, 2017

@Roamin

I find a solution, it works:

document.body.ondrop = function (event) {
    event.preventDefault();
    event.stopPropagation();
}
gaofei019

gaofei019 commented on Feb 28, 2017

@gaofei019

I have the same Q too.Thanks to RoamIn ! I have fixed it with the solution of RoamIn.

Magic-Bytes

Magic-Bytes commented on Jul 18, 2017

@Magic-Bytes

Thanks RoamIn. It really works!

lllllxt

lllllxt commented on Feb 5, 2018

@lllllxt

Thanks @Roamin

Renee98

Renee98 commented on Mar 14, 2018

@Renee98

Thanks

ellisonLou

ellisonLou commented on May 21, 2018

@ellisonLou

@Roamin your solution works, but all the dom on the page can not receive any drag event!

zhangying-dev

zhangying-dev commented on May 30, 2018

@zhangying-dev

@Roamin your solution works, but all the dom on the page can not receive any drag event!

Roamin

Roamin commented on May 30, 2018

@Roamin

Pity...

PetrKosvanec

PetrKosvanec commented on Dec 28, 2018

@PetrKosvanec

Solution follows. I changed
var internalDNDType = 'text';
to


22 var internalDNDType = 'whatever';
23 function dragStartHandler(event) {
25 if (event.target instanceof HTMLLIElement) {
27 event.dataTransfer.setData(internalDNDType, event.target.dataset.value);
28 event.dataTransfer.effectAllowed = 'move'; // only allow moves
29 } else {
30 event.preventDefault(); // don’t allow selection to be dragged
31 }
32 }

and the trouble is over.

owen-m1

owen-m1 commented on Dec 29, 2018

@owen-m1
Member

This is due to your browser extension. You can get around this yourself if you use setData:

new Sortable(myList, {
    setData(dataTransfer) {
        // use dataTransfer.setData to set data
    }
});
added a commit that references this issue on Jan 19, 2019
dxyqqs

dxyqqs commented on Jul 16, 2019

@dxyqqs

This is due to your browser extension. You can get around this yourself if you use setData:

new Sortable(myList, {
    setData(dataTransfer) {
        // use dataTransfer.setData to set data
    }
});

Nice work. it is better than setting 'ondrop ' on body!

added a commit that references this issue on Nov 18, 2019
added a commit that references this issue on Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @CatoTH@xuanskyer@dxyqqs@EagleChinaWu@Magic-Bytes

        Issue actions

          Firefox 49.0.2 drag and drop will open a new TAB · Issue #985 · SortableJS/Sortable