1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-17 20:51:20 +02:00

Allow onContextMenu even handler (#1956)

Right clicks aren't handled by onClick in a content-editable component. So we need access to a onContextMenu handler to handle these events properly.
My use case is to be able to open a context menu with actions when the user right-clicks a specific inline node.
This commit is contained in:
Rik
2018-07-19 21:13:13 +02:00
committed by Ian Storm Taylor
parent eab4361d92
commit 3405e2f822

View File

@@ -8,6 +8,7 @@ const EVENT_HANDLERS = [
'onBeforeInput', 'onBeforeInput',
'onBlur', 'onBlur',
'onClick', 'onClick',
'onContextMenu',
'onCompositionEnd', 'onCompositionEnd',
'onCompositionStart', 'onCompositionStart',
'onCopy', 'onCopy',