-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Description
I'm trying the demo, http://webcloud.se/react-sortable/, in Firefox and there is an issue in that after sorting the list the web browser navigates to another page. For example, dragging "Hotpink" around makes the browser navigate to http://www.hotpink.com/ (which is a porn site, by the way).
This is the user agent where I tested this:
Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
This is the expected behaviour in Firefox (also in IE, so the issue is probably also present there) so in order to fix it you might need to implement the onDrag event and stop its propagation:
SortableComposition.js
...
handleDrop = (e) => {
e.preventDefault();
}
render() {
let newProps = Object.assign({}, this.props)
delete newProps.onSortItems
const { sortId, ...props } = newProps
return (
<Component
...
onDrop={this.handleDrop}
...
/>
)
pesikar, harekuer, labuut, arisvn-binhNA and satrix321
Metadata
Metadata
Assignees
Labels
No labels