Skip to content
Snippets Groups Projects
Commit 0fcb2772 authored by chris's avatar chris
Browse files

fix transform case and highlight

parent 064b17ce
No related branches found
No related tags found
1 merge request!597Use view context
......@@ -85,7 +85,7 @@ const TransformCaseComponent = ({ view: { state }, item }) => {
// { id: 4, name: 'Title Case', iconName: 'transformCase' },
];
const onClickTransform = (e, id) => {
const onClickTransform = id => {
switch (id) {
case 1:
item.run(activeView.state, activeView.dispatch, 'upperCase');
......@@ -111,7 +111,11 @@ const TransformCaseComponent = ({ view: { state }, item }) => {
{transformCaseDropDown.map(data => (
<Transformer
key={uuid()}
onClick={e => onClickTransform(e, data.id)}
onMouseDown={e => {
e.preventDefault();
onClickTransform(data.id);
activeView.focus();
}}
title={data.name}
>
<StyledIcon name={data.iconName} />
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment