diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index 4efbb609d..2835cc727 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -85,6 +85,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle return true; } + /// #if !MOBILE const searchIconElement = hasClosestByAttribute(event.target, "data-type", "av-search-icon"); if (searchIconElement) { const searchElement = blockElement.querySelector('input[data-type="av-search"]') as HTMLInputElement; @@ -98,7 +99,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle event.stopPropagation(); return true; } - + /// #endif const viewItemElement = hasClosestByClassName(event.target, "item"); if (viewItemElement && viewItemElement.parentElement.classList.contains("layout-tab-bar")) { if (viewItemElement.classList.contains("item--focus")) { diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts index 305c47d44..f50ad1a8f 100644 --- a/app/src/protyle/render/av/render.ts +++ b/app/src/protyle/render/av/render.ts @@ -10,6 +10,7 @@ import {getCalcValue} from "./calc"; import {renderAVAttribute} from "./blockAttr"; import {showMessage} from "../../../dialog/message"; import {addClearButton} from "../../../util/addClearButton"; +import {isMobile} from "../../../util/functions"; export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, viewID?: string) => { let avElements: Element[] = []; @@ -235,11 +236,11 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}
- +
- +
@@ -365,6 +366,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)} searchInputElement.addEventListener("compositionend", () => { updateSearch(e, protyle); }); + /// #if !MOBILE searchInputElement.addEventListener("blur", (event: KeyboardEvent) => { if (event.isComposing) { return; @@ -376,6 +378,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)} searchInputElement.style.paddingRight = "0"; } }); + /// #endif addClearButton({ inputElement: searchInputElement, right: 0, @@ -383,9 +386,11 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)} height: searchInputElement.clientHeight, clearCB() { viewsElement.classList.remove("av__views--show"); + /// #if !MOBILE searchInputElement.style.width = "0"; searchInputElement.style.paddingLeft = "0"; searchInputElement.style.paddingRight = "0"; + /// #endif focusBlock(e); updateSearch(e, protyle); }