How can I detect the context menu-> Select all event in the browser?

We use CodeMirror for the XML Editor component that we have. There are many listeners in it, which among them is β€œSelect All” (CTRL-A). It listens for CTRL and A combinations and resets the selection internally (since it consists of many span and div elements).

When the user right-clicks on the text and clicks "Select All", he does not fire the same event as CTRL-A. So my question is: what is a right-click event (context menu), and then select "All"?

+4
source share

Source: https://habr.com/ru/post/1380183/


All Articles