Skip to content

Commit

Permalink
🎨 #13244
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Nov 25, 2024
1 parent 1ed5730 commit 23ee202
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/protyle/wysiwyg/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2083,7 +2083,7 @@ export class WYSIWYG {
if ( event.key !== "PageUp" && event.key !== "PageDown" && event.key !== "Home" && event.key !== "End" &&
event.key.indexOf("Arrow") === -1 && event.key !== "Escape" && event.key !== "Shift" &&
event.key !== "Meta" && event.key !== "Alt" && event.key !== "Control" && event.key !== "CapsLock" &&
!event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey&&
!event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey &&
!/^F\d{1,2}$/.test(event.key) ){
// 搜狗输入法不走 keydown,需重新记录历史状态
if ( nodeElement &&
Expand Down
2 changes: 1 addition & 1 deletion app/src/protyle/wysiwyg/keydown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
// 有可能输入 shift+. ,因此需要使用 event.key 来进行判断
if (event.key !== "PageUp" && event.key !== "PageDown" && event.key !== "Home" && event.key !== "End" && event.key.indexOf("Arrow") === -1 &&
event.key !== "Escape" && event.key !== "Shift" && event.key !== "Meta" && event.key !== "Alt" && event.key !== "Control" && event.key !== "CapsLock" &&
!isNotEditBlock(nodeElement) && !event.ctrlKey && !event.shiftKey && !event.metaKey && !event.altKey&&!/^F\d{1,2}$/.test(event.key)) {
!isNotEditBlock(nodeElement) &&!/^F\d{1,2}$/.test(event.key)) {
const cloneRange = range.cloneRange();
range.collapse(false);
range.insertNode(document.createElement("wbr"));
Expand Down

0 comments on commit 23ee202

Please sign in to comment.