angular2-multiselect-dropdown
angular2-multiselect-dropdown copied to clipboard
change click event to pointer down to avoid unwanted multiselect closing
Expected behavior:
Firefox has the right behavior:
- User opens the Multiselect
- Enters some string into the search filter field.
- User wants to copy the input string by marking it with the mouse pointer.
- User goes from right to the left while holding the left mouse button to mark the text.
- User accidentally leaves the Multiselect area and releases left mouse button.
- Multiselect is still opened after release of the left mouse button and the text of the search filter is marked and ready for copy&paste.
Wrong behavior
Chrome has the wrong behavior:
- User opens the Multiselect
- Enters some string into the search filter field.
- User wants to copy the input string by marking it with the mouse pointer.
- User goes from right to the left while holding the left mouse button to mark the text.
- User accidentally leaves the Multiselect area and releases left mouse button.
- Multiselect is closed because Chrome triggers the click event based on where the mouseUp event happens.
Fix
change click event to pointer down to avoid unwanted multiselect closing