mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-04 20:00:17 +01:00
This commit is contained in:
parent
7c07f531a3
commit
cab8ea3a5d
3 changed files with 3 additions and 3 deletions
|
|
@ -103,7 +103,7 @@ export const genTabHeaderHTML = (data: IAV, showSearch: boolean, editable: boole
|
|||
<svg><use xlink:href="#iconSearch"></use></svg>
|
||||
</button>
|
||||
<div style="position: relative" class="fn__flex">
|
||||
<div contenteditable="true" style="${showSearch ? "width:128px" : "width:0;padding-left: 0;padding-right: 0;"}" data-type="av-search" class="b3-text-field b3-text-field--text" placeholder="${window.siyuan.languages.search}"></div>
|
||||
<div contenteditable="plaintext-only" style="${showSearch ? "width:128px" : "width:0;padding-left: 0;padding-right: 0;"}" data-type="av-search" class="b3-text-field b3-text-field--text" placeholder="${window.siyuan.languages.search}"></div>
|
||||
</div>
|
||||
<div class="fn__space"></div>
|
||||
<span data-type="av-more" aria-label="${window.siyuan.languages.config}" data-position="8south" class="ariaLabel block__icon">
|
||||
|
|
|
|||
|
|
@ -2387,7 +2387,7 @@ export class WYSIWYG {
|
|||
|
||||
this.element.addEventListener("paste", (event: ClipboardEvent & { target: HTMLElement }) => {
|
||||
// https://github.com/siyuan-note/siyuan/issues/11241
|
||||
if (event.target.getAttribute("data-type") === "av-search") {
|
||||
if (hasClosestByAttribute(event.target, "data-type", "av-search")) {
|
||||
return;
|
||||
}
|
||||
if (protyle.disabled) {
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
if (event.target.getAttribute("data-type") === "av-search") {
|
||||
if (hasClosestByAttribute(event.target, "data-type", "av-search")) {
|
||||
if (matchHotKey("⌘A", event)) {
|
||||
event.preventDefault();
|
||||
getSelection().getRangeAt(0).selectNodeContents(event.target);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue