Commit 62d87e5d authored by Joel Einbinder's avatar Joel Einbinder Committed by Commit Bot

DevTools: Redirect all console pastes into the prompt

Bug: 725710
Change-Id: I356edbb435a5f877726b0f480130fb715f36f9ce
Reviewed-on: https://chromium-review.googlesource.com/826052Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524184}
parent 1a32b2ec
......@@ -161,6 +161,7 @@ Console.ConsoleView = class extends UI.VBox {
this._messagesElement.id = 'console-messages';
this._messagesElement.classList.add('monospace');
this._messagesElement.addEventListener('click', this._messagesClicked.bind(this), true);
this._messagesElement.addEventListener('paste', this._messagesPasted.bind(this), true);
this._viewportThrottler = new Common.Throttler(50);
......@@ -860,6 +861,15 @@ Console.ConsoleView = class extends UI.VBox {
this._updateMessageList();
}
/**
* @param {!Event} event
*/
_messagesPasted(event) {
if (UI.isEditing())
return;
this._prompt.focus();
}
_registerShortcuts() {
this._shortcuts = {};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment