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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

onClick of Drop-down style menu dismisses selected text #291

Closed
d-e-v-esh opened this issue Mar 11, 2021 · 0 comments 路 Fixed by #292
Closed

onClick of Drop-down style menu dismisses selected text #291

d-e-v-esh opened this issue Mar 11, 2021 · 0 comments 路 Fixed by #292

Comments

@d-e-v-esh
Copy link
Contributor

d-e-v-esh commented Mar 11, 2021

Bug Report 馃悰

When we have something selected and we want to change the styling, going to the style dropdown menu and clicking on it, deselects the selected text. Even though the menu is such that it would open up on hover, the rest of the buttons in the toolbar do not have this problem and it creates a bad user experience if it is clicked upon.

Expected Behavior

Clicking on the dropdown menu with the selected text should not deselect the selection.

Current Behavior

Clicking on the menu with selected text deselects the text.
D4ZG33Cq4d

Possible Solution

Adding a preventDefault() to the menu would fix this issue.

Steps to Reproduce

  1. Select any text in the text editor.
  2. Go to the dropdown menu with the selected text and click on the menu.
  3. The selected text would be deselected.

Context (Environment)

Desktop

  • OS: [e.g. macOS]
  • Browser: [e.g. Chrome, Safari]
  • Version: [e.g. 0.22.15]
d-e-v-esh added a commit to d-e-v-esh/web-components that referenced this issue Mar 11, 2021
Signed-off-by: d-e-v-esh <59534570+d-e-v-esh@users.noreply.github.com>
mttrbrts pushed a commit that referenced this issue Mar 12, 2021
Signed-off-by: d-e-v-esh <59534570+d-e-v-esh@users.noreply.github.com>
Cronus1007 added a commit to Cronus1007/web-components that referenced this issue Mar 12, 2021
Cronus1007 added a commit to Cronus1007/web-components that referenced this issue Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants