Skip to content

Commit

Permalink
Remove isRtl
Browse files Browse the repository at this point in the history
  • Loading branch information
JiuqingSong committed Aug 31, 2020
1 parent 9121a87 commit fbb49a0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
1 change: 0 additions & 1 deletion packages/roosterjs-editor-dom/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export {
export { default as getTagOfNode } from './utils/getTagOfNode';
export { default as isBlockElement } from './utils/isBlockElement';
export { default as isNodeEmpty } from './utils/isNodeEmpty';
export { default as isRtl } from './utils/isRtl';
export { default as isVoidHtmlElement } from './utils/isVoidHtmlElement';
export { default as matchLink } from './utils/matchLink';
export { default as adjustNodeInsertPosition } from './utils/adjustNodeInsertPosition';
Expand Down
10 changes: 0 additions & 10 deletions packages/roosterjs-editor-dom/lib/utils/isRtl.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Browser, isRtl, Position } from 'roosterjs-editor-dom';
import { Browser, getComputedStyle, Position } from 'roosterjs-editor-dom';
import { ContentEditFeature, CursorFeatureSettings, Keys } from 'roosterjs-editor-types';

const NoCycleCursorMove: ContentEditFeature = {
Expand All @@ -18,7 +18,7 @@ const NoCycleCursorMove: ContentEditFeature = {
return false;
}

let rtl = isRtl(position.element);
let rtl = getComputedStyle(position.element, 'direction') == 'rtl';
let rawEvent = event.rawEvent;

return (!rtl && rawEvent.which == Keys.LEFT) || (rtl && rawEvent.which == Keys.RIGHT);
Expand Down

0 comments on commit fbb49a0

Please sign in to comment.