DescriptionDevTools: [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
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175286
Patch Set 1 #
Messages
Total messages: 8 (0 generated)
|