diff --git a/ivette/src/dome/renderer/text/richtext.tsx b/ivette/src/dome/renderer/text/richtext.tsx index 936ea7ad45aa74d0f47b305d1116e54525bdbaa1..7c55f99c6ab405ae82efb20c5e5729852d59a89d 100644 --- a/ivette/src/dome/renderer/text/richtext.tsx +++ b/ivette/src/dome/renderer/text/richtext.tsx @@ -330,13 +330,13 @@ class Option extends Extension { private readonly spec: CS.Extension; private readonly comp = new CS.Compartment(); - constructor(extension: CS.Extension, active=true) { + constructor(extension: CS.Extension) { super(); this.spec = extension; - this.pack(this.comp.of(active ? extension : [])); + this.pack(this.comp.of([])); } - dispatch(view: View, active?: boolean): void { + dispatch(view: View, active: boolean): void { if (view !== null && active !== undefined) { const effects = this.comp.reconfigure(active ? this.spec : []); view.dispatch({ effects }); @@ -868,8 +868,8 @@ export function TextView(props: TextViewProps) : JSX.Element { onViewport: onReview = null, onSelection: onSelect = null, onDoubleClick: onDouble = null, - lineNumbers: lines, - showCurrentLine: active, + lineNumbers: lines = false, + showCurrentLine: active = false, } = props; React.useEffect(() => OnClick.dispatch(view, onClick), [view, onClick]); React.useEffect(() => OnPopup.dispatch(view, onPopup), [view, onPopup]);