OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Tab.code) { | 125 if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Tab.code) { |
126 event.preventDefault(); | 126 event.preventDefault(); |
127 return; | 127 return; |
128 } | 128 } |
129 | 129 |
130 if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Enter.code) | 130 if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Enter.code) |
131 this._delegate.onEnter(); | 131 this._delegate.onEnter(); |
132 | 132 |
133 if (this._closeKeys.indexOf(event.keyCode) >= 0) { | 133 if (this._closeKeys.indexOf(event.keyCode) >= 0) { |
134 this._hide(); | 134 this._hide(); |
135 event.consume(); | 135 event.consume(true); |
136 } | 136 } |
137 } | 137 } |
138 }; | 138 }; |
139 | 139 |
140 /** | 140 /** |
141 * @constructor | 141 * @constructor |
142 * @extends {WebInspector.Object} | 142 * @extends {WebInspector.Object} |
143 */ | 143 */ |
144 WebInspector.DialogDelegate = function() | 144 WebInspector.DialogDelegate = function() |
145 { | 145 { |
(...skipping 29 matching lines...) Expand all Loading... |
175 }, | 175 }, |
176 | 176 |
177 focus: function() { }, | 177 focus: function() { }, |
178 | 178 |
179 onEnter: function() { }, | 179 onEnter: function() { }, |
180 | 180 |
181 willHide: function() { } | 181 willHide: function() { } |
182 }; | 182 }; |
183 | 183 |
184 WebInspector.DialogDelegate.prototype.__proto__ = WebInspector.Object.prototype; | 184 WebInspector.DialogDelegate.prototype.__proto__ = WebInspector.Object.prototype; |
OLD | NEW |