Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent mouse click on input text from clearing text #1159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zachary1006
Copy link

As noted in #646, clicking inside a power-select-multiple input field after typing text clears the text. This proposed fix stops the propagation of the mousedown event if there is text in the input field.

To reproduce:
This issue can be seen on the Ember Power Select multiple-selection page (https://ember-power-select.com/docs/multiple-selection). To reproduce, type some text into the input field (do not press "Enter"). Then click your mouse in the input field, as though you were adjusting the cursor on a Word document. The text vanishes and the dropdown is closed.
screen shot 2018-09-20 at 8 28 03 am
Typing in the input
screen shot 2018-09-20 at 8 28 10 am
Text disappears on click

Expected behavior:
The cursor can be repositioned by clicking the mouse.
screen shot 2018-09-20 at 8 31 36 am
Cursor can be repositioned by clicking in the input

@dwickern
Copy link
Contributor

dwickern commented Mar 4, 2019

@cibernox Could you take a look at this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants