mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-28 01:44:07 +01:00
This commit is contained in:
parent
3685753c75
commit
cab1545fed
2 changed files with 17 additions and 9 deletions
|
|
@ -2670,7 +2670,7 @@ export class WYSIWYG {
|
||||||
/// #if MOBILE
|
/// #if MOBILE
|
||||||
mobileBlur = true;
|
mobileBlur = true;
|
||||||
activeBlur();
|
activeBlur();
|
||||||
openMobileFileById(protyle.app, refBlockId, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]);
|
openMobileFileById(protyle.app, refBlockId, zoomIn ? [Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL], "start");
|
||||||
/// #else
|
/// #else
|
||||||
if (event.shiftKey) {
|
if (event.shiftKey) {
|
||||||
openFileById({
|
openFileById({
|
||||||
|
|
@ -2678,7 +2678,8 @@ export class WYSIWYG {
|
||||||
id: refBlockId,
|
id: refBlockId,
|
||||||
position: "bottom",
|
position: "bottom",
|
||||||
action,
|
action,
|
||||||
zoomIn
|
zoomIn,
|
||||||
|
scrollPosition: "start"
|
||||||
});
|
});
|
||||||
window.dispatchEvent(new KeyboardEvent("keydown", {key: "Escape"}));
|
window.dispatchEvent(new KeyboardEvent("keydown", {key: "Escape"}));
|
||||||
} else if (event.altKey) {
|
} else if (event.altKey) {
|
||||||
|
|
@ -2687,7 +2688,8 @@ export class WYSIWYG {
|
||||||
id: refBlockId,
|
id: refBlockId,
|
||||||
position: "right",
|
position: "right",
|
||||||
action,
|
action,
|
||||||
zoomIn
|
zoomIn,
|
||||||
|
scrollPosition: "start"
|
||||||
});
|
});
|
||||||
} else if (ctrlIsPressed) {
|
} else if (ctrlIsPressed) {
|
||||||
openFileById({
|
openFileById({
|
||||||
|
|
@ -2695,14 +2697,16 @@ export class WYSIWYG {
|
||||||
id: refBlockId,
|
id: refBlockId,
|
||||||
keepCursor: true,
|
keepCursor: true,
|
||||||
action: zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL],
|
action: zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL],
|
||||||
zoomIn
|
zoomIn,
|
||||||
|
scrollPosition: "start"
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
openFileById({
|
openFileById({
|
||||||
app: protyle.app,
|
app: protyle.app,
|
||||||
id: refBlockId,
|
id: refBlockId,
|
||||||
action,
|
action,
|
||||||
zoomIn
|
zoomIn,
|
||||||
|
scrollPosition: "start"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/// #endif
|
/// #endif
|
||||||
|
|
|
||||||
|
|
@ -1960,7 +1960,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
app: protyle.app,
|
app: protyle.app,
|
||||||
id,
|
id,
|
||||||
action,
|
action,
|
||||||
zoomIn
|
zoomIn,
|
||||||
|
scrollPosition: "start"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -1974,7 +1975,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
id,
|
id,
|
||||||
action: zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL],
|
action: zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL],
|
||||||
keepCursor: true,
|
keepCursor: true,
|
||||||
zoomIn
|
zoomIn,
|
||||||
|
scrollPosition: "start"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -1990,7 +1992,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
id,
|
id,
|
||||||
position: "right",
|
position: "right",
|
||||||
action,
|
action,
|
||||||
zoomIn
|
zoomIn,
|
||||||
|
scrollPosition: "start"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -2006,7 +2009,8 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
id,
|
id,
|
||||||
position: "bottom",
|
position: "bottom",
|
||||||
action,
|
action,
|
||||||
zoomIn
|
zoomIn,
|
||||||
|
scrollPosition: "start"
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue