Skip to content
  • Masayuki Nakano's avatar
    Bug 1461708 - part 8: Make EventStateManager handle middle click paste as a... · 5c47cf2c
    Masayuki Nakano authored
    Bug 1461708 - part 8: Make EventStateManager handle middle click paste as a default action of mouseup event r=smaug
    
    This patch makes EventStateManager handle middle click paste as a default
    action.
    
    Unfortunately, we cannot remove the call of HandleMiddleClickPaste() in
    EditorEventListener because it's important to consume middle click event
    before any elements in the editor.  For example, if clicked HTMLEditor has
    non-editable <a href> element, middle click event needs to be handled by the
    editor rather than contentAreaUtils which handles click events of <a href>
    elements.  The cause of this kind of issues is, any click event handlers
    which handle non-primary button events still listen to "click" events.
    Therefore, this patch makes HandleMiddleClickPaste() do nothing if the mouseup
    event is fired on an editor.
    
    Differential Revision: https://phabricator.services.mozilla.com/D7855
    
    --HG--
    extra : moz-landing-system : lando
    5c47cf2c