Changeset 227008 in webkit


Ignore:
Timestamp:
Jan 16, 2018 3:17:36 PM (6 years ago)
Author:
Matt Baker
Message:

Web Inspector: Canvas tab: typing a "space" in the QuickConsole shouldn't trigger a recording
https://bugs.webkit.org/show_bug.cgi?id=181706
<rdar://problem/36558221>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/CanvasOverviewContentView.js:

(WI.CanvasOverviewContentView):
(WI.CanvasOverviewContentView.prototype._handleSpace):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r227003 r227008  
     12018-01-16  Matt Baker  <mattbaker@apple.com>
     2
     3        Web Inspector: Canvas tab: typing a "space" in the QuickConsole shouldn't trigger a recording
     4        https://bugs.webkit.org/show_bug.cgi?id=181706
     5        <rdar://problem/36558221>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * UserInterface/Views/CanvasOverviewContentView.js:
     10        (WI.CanvasOverviewContentView):
     11        (WI.CanvasOverviewContentView.prototype._handleSpace):
     12
    1132018-01-16  Joseph Pecoraro  <pecoraro@apple.com>
    214
  • trunk/Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js

    r225587 r227008  
    6262            new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Down, this._handleDown.bind(this)),
    6363            new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Left, this._handleLeft.bind(this)),
    64             new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this)),
    65             new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.Shift, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this)),
    6664        ];
     65
     66        let recordShortcut = new WI.KeyboardShortcut(null, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this));
     67        recordShortcut.implicitlyPreventsDefault = false;
     68        this._keyboardShortcuts.push(recordShortcut);
     69
     70        let recordSingleFrameShortcut = new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.Shift, WI.KeyboardShortcut.Key.Space, this._handleSpace.bind(this));
     71        recordSingleFrameShortcut.implicitlyPreventsDefault = false;
     72        this._keyboardShortcuts.push(recordSingleFrameShortcut);
    6773
    6874        for (let shortcut of this._keyboardShortcuts)
     
    242248    _handleSpace(event)
    243249    {
     250        if (WI.isEventTargetAnEditableField(event))
     251            return;
     252
    244253        if (!this._selectedItem)
    245254            return;
     
    251260            WI.canvasManager.startRecording(this._selectedItem, singleFrame);
    252261        }
     262
     263        event.preventDefault();
    253264    }
    254265
Note: See TracChangeset for help on using the changeset viewer.