Skip to content

Commit

Permalink
Merge pull request #834 from rluba/fix/drop_on_children
Browse files Browse the repository at this point in the history
Fix dropping a file onto an existing attachment
  • Loading branch information
Javan Makhmali authored Oct 12, 2020
2 parents a552415 + 55e9f2f commit 7efb14b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/trix/controllers/level_2_input_controller.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ class Trix.Level2InputController extends Trix.InputController
@dragging.point = point
@responder?.setLocationRangeFromPointRange(point)

else if dragEventHasFiles(event)
event.preventDefault()

drop: (event) ->
if @dragging
event.preventDefault()
Expand Down

0 comments on commit 7efb14b

Please sign in to comment.