DevTools: [CodeMirror] show native copy/paste/cut items in editor context menu
Currently, if you select some text in text editor and then do a right-click inside selection, the just-summoned context menu won't have a copy/paste/cut items, as well as other native items natural for text area context menu. This happens due to the way CodeMirror handles contextmenu event. It focuses a small text area during the contextmenu bubbling phase, so the upcoming ContextMenu gets populated with appropriate items. Unfortunately, codemirror does all this textarea mess *after* firing its own "contextmenu" event, and as we create menu in the listener, it doesn't have correct active element. This patch goes back to listening contextmenu event on element, which due to bubbling nature happens after textarea was focused. R=vsevik Review URL: https://codereview.chromium.org/306023015 git-svn-id: svn://svn.chromium.org/blink/trunk@175286 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment