OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="import" href="/tracing/extras/tquery/tquery.html"> | 8 <link rel="import" href="/tracing/extras/tquery/tquery.html"> |
9 | 9 |
10 <dom-module id='tr-ui-scripting-control'> | 10 <dom-module id='tr-ui-scripting-control'> |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 sel.collapse(promptEl.firstChild, promptEl.innerText.length); | 94 sel.collapse(promptEl.firstChild, promptEl.innerText.length); |
95 } | 95 } |
96 } else { | 96 } else { |
97 promptEl.blur(); | 97 promptEl.blur(); |
98 this.$.root.classList.remove('focused'); | 98 this.$.root.classList.remove('focused'); |
99 // Workaround for crbug.com/89026 to ensure the prompt doesn't retain | 99 // Workaround for crbug.com/89026 to ensure the prompt doesn't retain |
100 // keyboard focus. | 100 // keyboard focus. |
101 var parent = promptEl.parentElement; | 101 var parent = promptEl.parentElement; |
102 var nextEl = promptEl.nextSibling; | 102 var nextEl = promptEl.nextSibling; |
103 promptEl.remove(); | 103 promptEl.remove(); |
104 parent.insertBefore(promptEl, nextEl); | 104 Polymer.dom(parent).insertBefore(promptEl, nextEl); |
105 } | 105 } |
106 }, | 106 }, |
107 | 107 |
108 onConsoleFocus: function(e) { | 108 onConsoleFocus: function(e) { |
109 e.stopPropagation(); | 109 e.stopPropagation(); |
110 this._setFocused(true); | 110 this._setFocused(true); |
111 }, | 111 }, |
112 | 112 |
113 onConsoleBlur: function(e) { | 113 onConsoleBlur: function(e) { |
114 e.stopPropagation(); | 114 e.stopPropagation(); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 179 |
180 get controller() { | 180 get controller() { |
181 return this.controller_; | 181 return this.controller_; |
182 }, | 182 }, |
183 | 183 |
184 set controller(c) { | 184 set controller(c) { |
185 this.controller_ = c; | 185 this.controller_ = c; |
186 } | 186 } |
187 }); | 187 }); |
188 </script> | 188 </script> |
OLD | NEW |