diff --git a/apps/client/src/widgets/react/CKEditor.tsx b/apps/client/src/widgets/react/CKEditor.tsx index e9080e310..00399c6e8 100644 --- a/apps/client/src/widgets/react/CKEditor.tsx +++ b/apps/client/src/widgets/react/CKEditor.tsx @@ -10,7 +10,7 @@ interface CKEditorOpts { disableNewlines?: boolean; disableSpellcheck?: boolean; onChange?: (newValue?: string) => void; - onClick?: (e, pos?: ModelPosition | null) => void; + onClick?: (e: MouseEvent, pos?: ModelPosition | null) => void; } export default function CKEditor({ currentValue, className, tabIndex, editor, config, disableNewlines, disableSpellcheck, onChange, onClick }: CKEditorOpts) { diff --git a/apps/client/src/widgets/react/hooks.tsx b/apps/client/src/widgets/react/hooks.tsx index 6436b1734..304b9b22f 100644 --- a/apps/client/src/widgets/react/hooks.tsx +++ b/apps/client/src/widgets/react/hooks.tsx @@ -14,6 +14,7 @@ import FBlob from "../../entities/fblob"; import NoteContextAwareWidget from "../note_context_aware_widget"; import { Ref, RefObject, VNode } from "preact"; import { Tooltip } from "bootstrap"; +import { CSSProperties } from "preact/compat"; type TriliumEventHandler = (data: EventData) => void; const registeredHandlers: Map[]>> = new Map(); @@ -415,9 +416,10 @@ export function useNoteBlob(note: FNote | null | undefined): [ FBlob | null | un return [ blob ] as const; } -export function useLegacyWidget(widgetFactory: () => T, { noteContext, containerClassName }: { +export function useLegacyWidget(widgetFactory: () => T, { noteContext, containerClassName, containerStyle }: { noteContext?: NoteContext; containerClassName?: string; + containerStyle?: CSSProperties; } = {}): [VNode, T] { const ref = useRef(null); const parentComponent = useContext(ParentComponent); @@ -454,7 +456,7 @@ export function useLegacyWidget(widgetFactory: () => T, { } }, [ noteContext ]); - return [
, widget ] + return [
, widget ] } /** diff --git a/apps/client/src/widgets/ribbon/style.css b/apps/client/src/widgets/ribbon/style.css index 22c9d7b43..b66302a42 100644 --- a/apps/client/src/widgets/ribbon/style.css +++ b/apps/client/src/widgets/ribbon/style.css @@ -331,4 +331,9 @@ .attribute-list-editor p { margin: 0 !important; } + +.attribute-list .attr-detail { + contain: none; +} + /* #endregion */ \ No newline at end of file