DevTools: console object value editing via double click doesn't set correct value |
|||
Issue description
1) Open Console in DevTools
2) Enter "{inner: []}"
3) Click the arrow to expand "Object {inner: Array[0]}"
4) Double click on the value "Array[0]" to enter editing mode
5) Type "{x: 5}" and press enter
What is expected?
The value of the 'inner' key should be '{x: 5}'. Instead, DevTools just evaluates the expression as '5'.
Other examples:
Working
- Plain numbers 123
- Plain strings "abc"
- null
- undefined
Not always working
- Arrays [1,2,3]
- Objects {x: 1}
- Functions function(){}
,
Jul 29 2016
,
Apr 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f4ecb9e37e9e2d59e32b8b96f23ac4a1e33b9552 commit f4ecb9e37e9e2d59e32b8b96f23ac4a1e33b9552 Author: luoe <luoe@chromium.org> Date: Thu Apr 20 18:21:49 2017 DevTools: editing property values should wrap object literals similar to console When editing a property value in an ObjPropSection (double click the value), we should be wrapping object literals the same way that console does: '{}' becomes '({})'. BUG= 616611 Review-Url: https://codereview.chromium.org/2800573002 Cr-Commit-Position: refs/heads/master@{#466077} [modify] https://crrev.com/f4ecb9e37e9e2d59e32b8b96f23ac4a1e33b9552/third_party/WebKit/LayoutTests/inspector/console/console-edit-property-value-expected.txt [modify] https://crrev.com/f4ecb9e37e9e2d59e32b8b96f23ac4a1e33b9552/third_party/WebKit/LayoutTests/inspector/console/console-edit-property-value.html [modify] https://crrev.com/f4ecb9e37e9e2d59e32b8b96f23ac4a1e33b9552/third_party/WebKit/Source/devtools/front_end/console_model/ConsoleModel.js [modify] https://crrev.com/f4ecb9e37e9e2d59e32b8b96f23ac4a1e33b9552/third_party/WebKit/Source/devtools/front_end/object_ui/ObjectPropertiesSection.js [modify] https://crrev.com/f4ecb9e37e9e2d59e32b8b96f23ac4a1e33b9552/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
,
Apr 20 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by l...@chromium.org
, Jun 1 2016