swimlane / ngx-datatable

✨ A feature-rich yet lightweight data-table crafted for Angular
http://swimlane.github.io/ngx-datatable/
MIT License
4.63k stars 1.68k forks source link

Selecting text in draggable column header affects drag & drop behavior #1356

Open roberthelmick08 opened 6 years ago

roberthelmick08 commented 6 years ago

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior GIVEN that user highlights text inside a draggable column header AND the user long-presses to drag the column WHEN the user attempts to drop the column by unclicking THEN the column does not drop AND still continues to track the mouse UNTIL user clicks again to drop the column

Expected behavior Column header should drop on mouseup event even when text is selected in draggable header.

Reproduction of the problem draggable-bug

What is the motivation / use case for changing the behavior? Behavioral consistency

Please tell us about your environment: Windows 10, Visual Studio Code, NPM, localhost

roberthelmick08 commented 6 years ago

It seems the issue is with the first character in particular. If I select only the 'S' in Stock #, the bug is present.

If I select everything except for the 'S', including the full strings 'Model' and 'VIN', the bug is not present and it behaves like normal. Also if I select the mat-icon in the top right corner, the bug is not present.

HackPoint commented 5 years ago

@roberthelmick08 do you have an example of how you changed the dragging class? it's seems to be a problem to find it in the API that missing.