Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Commit

Permalink
admin: don't alter Firefox behavior on DND
Browse files Browse the repository at this point in the history
Firefox is behaving as expected: `dropEffect` is correctly set depending
if the user user asking for a move or a copy. Don't do anything if
that's the case. However, Chromium doesn't do that, so this is the only
case where we have to force a behaviour.
  • Loading branch information
vincentbernat committed Aug 15, 2015
1 parent acb437c commit 68a662b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/scripts/directives/dragndrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ angular.module('dashkiosk.directives')
link: function(scope, element, attrs) {

var accept = function(event) {
if (event.type !== 'drop' ||
event.dataTransfer.dropEffect === 'none') {
if (event.dataTransfer.dropEffect === 'none') {
if (event.altKey || event.ctrlKey) {
event.dataTransfer.dropEffect = 'copy';
} else {
Expand Down

0 comments on commit 68a662b

Please sign in to comment.