Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

Commit

Permalink
Merge pull request #2 from accordproject/master
Browse files Browse the repository at this point in the history
fix(ui-markdown-editor): text deselection - #291 (#292)
  • Loading branch information
Cronus1007 authored Mar 12, 2021
2 parents 5abf561 + 79bc7d1 commit 1c6ee38
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ import {

const StyleDropdown = ({ canBeFormatted, currentStyle }) => {
const editor = useEditor();
const onMouseDownHandler = (event) => {
event.preventDefault();
if (!canBeFormatted(editor)) return;
}

const currentBlock = currentStyle;
return (
<Dropdown
simple
openOnFocus
onMouseDown={onMouseDownHandler}
text={currentBlock}
style={DROPDOWN_STYLE}
>
Expand Down

0 comments on commit 1c6ee38

Please # to comment.