Firefox drag and drop не работает

HTML5 drag and drop, событие «drop» не запускается в Firefox

Несмотря на то, что я внимательно прочитал документы Mozilla Developer Network и все ответы, которые я смог найти в Stack Overflow, я не могу заставить работать HTML5 drag and drop в Firefox. Я использую это в приложении AngularJS. Все отлично работает в Chrome и Internet Explorer, но не в Firefox (v33.1). Я бы предпочел не прибегать к использованию jQueryUI.

Надеюсь, кто-то может заметить здесь то, что мне не хватает. Как видно из приведенного ниже кода, я добавил несколько вызовов console.log () для каждого обработчика событий, чтобы убедиться, что каждое событие запускается, как и ожидалось. В Firefox запускаются все события, кроме события «drop».

Вот упрощенная версия моего кода:

4 ответа

Что ж, похоже, виновником была установка effectAllowed и dropEffect в функции handleDragStart() . Я не уверен, почему установка этих параметров отключает событие drop в Firefox. Поскольку я использовал их главным образом для их визуального эффекта (в Chrome курсор будет меняться в зависимости от того, какой эффект используется), в моем случае удаление этих строк решило проблему для меня.

РЕДАКТИРОВАТЬ: На самом деле, похоже, что в Firefox, если вы решите установить effectAllowed и dropEffect в обработчике dragstart , вам также нужно установить dropEffect в обработчики событий dragenter и dragover . Невыполнение этого условия предотвратит запуск события drop .

В отличие от большинства других браузеров, Firefox требует вызова метода e.dataTransfer.setData () в обработчике событий dragstart.

Запустите мой фрагмент кода ниже, чтобы увидеть его в действии.

Для меня это сработало только после добавления приведенного ниже кода в обработчик событий dragstart e.dataTransfer.setData («text», «somedata»);

Вы также можете использовать для перетаскивания сценария aculo. это предоставит вам много возможностей. Я подал заявку на моем сайте.

Источник

Firefox drag and drop не работает

Поиск в Поддержке

  1. Начало
  2. Форумы поддержки
  3. Firefox
  4. Drag-and-drop no longer working in Firefox

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

Drag-and-drop no longer working in Firefox

  • 3 ответа
  • 142 имеют эту проблему
  • 458 просмотров
  • Последний ответ от kylemhilliard

It seems that all of a sudden I cannot drag and drop or copy and paste any files or photos to any sites in Firefox. I have tried reinstalling FF as well as disabling all addons and plugins. I am also chacked my antivirus software to make sure it is not blocking FF. Nothing has corrected this issue. I am using version 54.0.1 (64 bit)

Читайте также:  Мицубиси аутлендер xl 2010 не работает поворот зеркал

Выбранное решение

Could you create a new profile, launch Firefox using that profile and see if the issue can be reproduced?

Источник

Firefox drag and drop не работает

Start Firefox in Safe Mode to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).

You can also try a clean reinstall and delete the Firefox program folder before (re)installing a fresh copy of the current Firefox release.

Download a fresh Firefox copy and save the file to the desktop.

Uninstall your current Firefox version, if possible, to cleanup the Windows registry and settings in security software.

  • Do NOT remove personal data when you uninstall your current Firefox version, because all profile folders will be removed and you lose personal data like bookmarks and passwords from profiles of other Firefox versions.

Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.

  • (32 bit Windows) «C:\Program Files\Mozilla Firefox\»
  • (64 bit Windows) «C:\Program Files (x86)\Mozilla Firefox\»
  • It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
  • http://kb.mozillazine.org/Uninstalling_Firefox

Your bookmarks and other personal data are stored in the Firefox profile folder and won’t be affected by an uninstall and (re)install, but make sure that «remove personal data» is NOT selected when you uninstall Firefox.

Источник

Firefox drag and drop не работает

After updating to v68 (x64) earlier today, drag and drop of pictures from Firefox to Windows desktop, stopped working

What I tried so far

Tried turning it off and on again didn’t work

Started firefox in safemode with no add-ons didn’t work

Started windows in safe mode and then started firefox in safemode with no add-ons didn’t work

Drag n Drop + holding Ctrl key didn’t work Drag n Drop + holding Alt key didn’t work

Created a new profile didn’t work

Re-installed v68 didn’t work

uninstalled and erased ALL firefox files, then installed v68 didn’t work

Installed v68 on a fresh install of Windows didn’t work

Installed a fresh copy of Windows on a freshly assembled computer and made a fresh installation of v68 Firefox didn’t work

Is there something else I can do, in order to fix this problem, besides using Google Chrome

Modified December 17, 2019 at 7:27:12 AM PST by Wag669

Chosen solution

I’m not sure how to react right now. Earlier today, dragging and dropping to desktop didn’t work, I tried to drag and drop a url on desktop, in order to check if creating a shortcut on desktop would work. It worked So, naturally, I tried to drag a picture and it worked.

Читайте также:  Как настроить роутер tp link mr3020

I just called a priest, I think my PC is in need of an exorcism

All Replies (20)

Does this happen on every website or just certain ones? Are you able to drag and drop the image onto the tab bar? Do you see the image when you are dragging it?

I ask because website developers can stop you from dragging and dropping images if they want to. So if the issue is website-specific, that could be what has happened.

Does this test page work properly for you?

hi, please try resetting the windows user account control settings to their default and restart the system once to see if this helps with the drag and drop issue: https://support.microsoft.com/help/975787/

Hi Wag669, as noted in the other thread where you replied, a bug was filed for this earlier today. When I learn anything new, I’ll update this thread.

Until then, one of two other methods could help:

Copy/Paste

  • right-click the image > Copy Image
  • right-click the Desktop > Paste

Save Image As

  • right-click the image > Save Image As

Works for me. Does this happen on every website or just certain ones? Are you able to drag and drop the image onto the tab bar? Do you see the image when you are dragging it? I ask because website developers can stop you from dragging and dropping images if they want to. So if the issue is website-specific, that could be what has happened. Does this test page work properly for you?

Happens on ALL sites I CAN drag and drop the image to the tab bar I DO see the image while dragging it but it has the circle-slash mouse pointer once I start dragging the image see attached image

How do I use the this test page?

hi, please try resetting the windows user account control settings to their default and restart the system once to see if this helps with the drag and drop issue: https://support.microsoft.com/help/975787/

If you read carefully my post, you will se that I installed a fresh copy of Windows on a freshly assembled computer and made a fresh installation of v68 Firefox and still could not drag and drop an image from firefox to desktop

Hi Wag669, as noted in the other thread where you replied, a bug was filed for this earlier today. When I learn anything new, I’ll update this thread. Until then, one of two other methods could help: Copy/Paste

  • right-click the image > Copy Image
  • right-click the Desktop > Paste

Save Image As

  • right-click the image > Save Image As

Right click -> Copy Image -> Paste Image (on desktop) works fine Right click -> Save Image works, but it saves the images in the default location, NOT the last used

Читайте также:  Как настроить яркость контрастность гамму

I also downloaded the Developer edition of FF 69.0b3 (64-bit) and dragging and dropping appears to have exactly the same behavior

behavior during dragging

Works for me. Does this happen on every website or just certain ones? Are you able to drag and drop the image onto the tab bar? Do you see the image when you are dragging it? I ask because website developers can stop you from dragging and dropping images if they want to. So if the issue is website-specific, that could be what has happened. Does [https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_image_test this test page] work properly for you?

hi, please try resetting the windows user account control settings to their default and restart the system once to see if this helps with the drag and drop issue: https://support.microsoft.com/help/975787/

Hi Wag669, as noted in the other thread where you replied, a bug was filed for this earlier today. When I learn anything new, I’ll update this thread. Until then, one of two other methods could help: »’Copy/Paste»’ * right-click the image > Copy Image * right-click the Desktop > Paste »’Save Image As»’ * right-click the image > Save Image As

Modified July 10, 2019 at 10:16:01 AM PDT by Wag669

Источник

Firefox drag and drop не работает

Start Firefox in Safe Mode to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).

You can also try a clean reinstall and delete the Firefox program folder before (re)installing a fresh copy of the current Firefox release.

Download a fresh Firefox copy and save the file to the desktop.

Uninstall your current Firefox version, if possible, to cleanup the Windows registry and settings in security software.

  • Do NOT remove personal data when you uninstall your current Firefox version, because all profile folders will be removed and you lose personal data like bookmarks and passwords from profiles of other Firefox versions.

Remove the Firefox program folder before installing that newly downloaded copy of the Firefox installer.

  • (32 bit Windows) «C:\Program Files\Mozilla Firefox\»
  • (64 bit Windows) «C:\Program Files (x86)\Mozilla Firefox\»
  • It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
  • http://kb.mozillazine.org/Uninstalling_Firefox

Your bookmarks and other personal data are stored in the Firefox profile folder and won’t be affected by an uninstall and (re)install, but make sure that «remove personal data» is NOT selected when you uninstall Firefox.

Источник

Оцените статью