Skip to content

Commit

Permalink
Fix firefox event issue related to Button tag (#544)
Browse files Browse the repository at this point in the history
* Fix firefox event issue related to Button tag

This is the same issue as #118 but it also applies to button on FF
  • Loading branch information
benadam11 authored and Claudéric Demers committed Aug 21, 2019
1 parent d3b30fd commit 6c7a90d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/SortableContainer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ export default function sortableContainer(
* prevent subsequent 'mousemove' events from being fired
* (see https://github.com/clauderic/react-sortable-hoc/issues/118)
*/
if (!isTouchEvent(event) && event.target.tagName === NodeType.Anchor) {
if (
!isTouchEvent(event) &&
(event.target.tagName === NodeType.Anchor ||
event.target.tagName === NodeType.Button)
) {
event.preventDefault();
}

Expand Down

0 comments on commit 6c7a90d

Please sign in to comment.