preventDefault() and stopPropagation() appear to be missing from drag and drop of DataTable - Reorder and causes redirect to 'www.b.com' #460
Labels
Type: Bug
Issue contains a defect related to a specific component.
Milestone
I'm submitting a ... (check one with "x")
Current behavior
On drop of table row for reorder, page will re-direct to random page. I believe this is caused by not including the event.preventDefault() and event.stopPropegation() on the onDrop() event. Currently this only seems to be affecting Firefox.
Expected behavior
The expected outcome would be that it doesn't redirect on the drop event.
Minimal reproduction of the problem with instructions
To reproduce, use the drag and drop feature in the DataTable component with reorderableRows={true}. This is currently reproducible on the PrimeReact demo page as well (https://www.primefaces.org/primereact/#/datatable/reorder).
Please tell us about your environment:
HTTP Server: Apache
OS: RedHat/Fedora/Windows 7/10
React version:
v16.4.0
PrimeReact version:
v1.6.0
Browser:
Mozilla Firefox v58.0.1
Language:
ES6/7
The text was updated successfully, but these errors were encountered: