Changeset 153091 in webkit


Ignore:
Timestamp:
Jul 24, 2013, 11:28:40 AM (12 years ago)
Author:
Antoine Quint
Message:

Web Inspector: control+clicking on a numeric token should not show the context menu
https://bugs.webkit.org/show_bug.cgi?id=119048

Reviewed by Timothy Hatcher.

Track "contextmenu" events when we're hovering a token containing a numeric value
and call preventDefault() in the event handler to ensure that the context menu does
not appear.

  • UserInterface/CodeMirrorDragToAlterNumberController.js:

(WebInspector.CodeMirrorDragToAlterNumberController.prototype.handleEvent):
(WebInspector.CodeMirrorDragToAlterNumberController.prototype._setTracksMouseClickAndDrag):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r153087 r153091  
     12013-07-24  Antoine Quint  <graouts@apple.com>
     2
     3        Web Inspector: control+clicking on a numeric token should not show the context menu
     4        https://bugs.webkit.org/show_bug.cgi?id=119048
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Track "contextmenu" events when we're hovering a token containing a numeric value
     9        and call preventDefault() in the event handler to ensure that the context menu does
     10        not appear.
     11
     12        * UserInterface/CodeMirrorDragToAlterNumberController.js:
     13        (WebInspector.CodeMirrorDragToAlterNumberController.prototype.handleEvent):
     14        (WebInspector.CodeMirrorDragToAlterNumberController.prototype._setTracksMouseClickAndDrag):
     15
    1162013-07-24  Antoine Quint  <graouts@apple.com>
    217
  • trunk/Source/WebInspectorUI/UserInterface/CodeMirrorDragToAlterNumberController.js

    r153087 r153091  
    8181            this._mouseWasReleased(event);
    8282            break;
     83        case "contextmenu":
     84            event.preventDefault();
     85            break;
    8386        }
    8487    },
     
    126129            this._element.classList.add(WebInspector.CodeMirrorDragToAlterNumberController.StyleClassName);
    127130            window.addEventListener("mousedown", this, true);
     131            window.addEventListener("contextmenu", this, true);
    128132        } else {
    129133            this._element.classList.remove(WebInspector.CodeMirrorDragToAlterNumberController.StyleClassName);
    130134            window.removeEventListener("mousedown", this, true);
     135            window.removeEventListener("contextmenu", this, true);
    131136            this._setDragging(false);
    132137        }
Note: See TracChangeset for help on using the changeset viewer.