Skip to content
Snippets Groups Projects
Commit 31d239dd authored by chris's avatar chris
Browse files

fix dispatching tr

parent ab4df676
No related branches found
No related tags found
1 merge request!190Find and replace
This commit is part of merge request !190. Comments created here will be created in the context of that merge request.
......@@ -7,7 +7,7 @@ import React, {
useCallback,
useEffect,
} from 'react';
import { debounce, each } from 'lodash';
import { debounce, each, eachRight } from 'lodash';
import styled from 'styled-components';
import { grid } from '@pubsweet/ui-toolkit';
import { WaxContext } from 'wax-prosemirror-core';
......@@ -119,7 +119,7 @@ const FindComponent = ({ close, expand, setPreviousSearcValue }) => {
if (counter > 0) setCounterText(`1 of ${counter}`);
if (searchRef.current === document.activeElement) {
each(view, (singleView, viewId) => {
eachRight(view, (singleView, viewId) => {
singleView.dispatch(singleView.state.tr);
});
}
......
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