@lexical/extension/NormalizeTripleClickSelectionExtension
Interfaces
NormalizeTripleClickSelectionConfig
Defined in: packages/lexical-extension/src/NormalizeTripleClickSelectionExtension.ts:45
Properties
$fixFocusOverselection
$fixFocusOverselection: () =>
void
Defined in: packages/lexical-extension/src/NormalizeTripleClickSelectionExtension.ts:60
The update function to call when triple click is detected
Returns
void
dateNow
dateNow: () =>
number
Defined in: packages/lexical-extension/src/NormalizeTripleClickSelectionExtension.ts:58
Returns
number
Deprecated
No longer used, see thresholdMsec.
disabled
disabled:
boolean
Defined in: packages/lexical-extension/src/NormalizeTripleClickSelectionExtension.ts:47
true to disable this extension
thresholdMsec
thresholdMsec:
number
Defined in: packages/lexical-extension/src/NormalizeTripleClickSelectionExtension.ts:54
Deprecated
No longer used. A triple click now applies to the next selection change however long it takes to arrive, until another click or a non-modifier keydown anywhere in the document cancels it. Kept so existing configurations still type check.
NormalizeTripleClickSelectionOutput
Defined in: packages/lexical-extension/src/NormalizeTripleClickSelectionExtension.ts:63
Properties
$fixFocusOverselection
$fixFocusOverselection:
Signal<() =>void>
Defined in: packages/lexical-extension/src/NormalizeTripleClickSelectionExtension.ts:78
The update function to call when triple click is detected
dateNow
dateNow:
Signal<() =>number>
Defined in: packages/lexical-extension/src/NormalizeTripleClickSelectionExtension.ts:76
Deprecated
No longer used, see thresholdMsec.
disabled
disabled:
Signal<boolean>
Defined in: packages/lexical-extension/src/NormalizeTripleClickSelectionExtension.ts:65
true to disable this extension
thresholdMsec
thresholdMsec:
Signal<number>
Defined in: packages/lexical-extension/src/NormalizeTripleClickSelectionExtension.ts:72
Deprecated
No longer used. A triple click now applies to the next selection change however long it takes to arrive, until another click or a non-modifier keydown anywhere in the document cancels it. Kept so existing configurations still type check.
Variables
NormalizeTripleClickSelectionExtension
constNormalizeTripleClickSelectionExtension:LexicalExtension<NormalizeTripleClickSelectionConfig,"@lexical/NormalizeTripleClickSelection",NormalizeTripleClickSelectionOutput,unknown>
Defined in: packages/lexical-extension/src/NormalizeTripleClickSelectionExtension.ts:186
This extension handles triple-click events and will move the focus towards the anchor in certain conditions to meet expectations. Simply speaking, the focus should prefer to land at the end of a node rather than the beginning of its next sibling, and it should not skip over a LineBreakNode.
In order to fix the result visually and avoid a flash of over-selection it will also eagerly manipulate the DOM selection directly.
It is conservative in that it only fires this
$fixFocusOverselection callback on the first selection change after a
triple click in the editor (and before any other keydown or click),
but it provides the function as an output signal so that it can both
be called from other places and it can be replaced or wrapped with
different functionality.