Bug 225203 - Web Inspector: should be able to type new line in Text node
Summary: Web Inspector: should be able to type new line in Text node
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-29 12:31 PDT by Sam Sneddon [:gsnedders]
Modified: 2021-04-29 12:53 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Sneddon [:gsnedders] 2021-04-29 12:31:33 PDT
When editing a Text node in the DOM, under the Elements tab, it should be possible to add a new line character to the Text node. I would expect Shift+Enter would do this.
Comment 1 Radar WebKit Bug Importer 2021-04-29 12:31:41 PDT
<rdar://problem/77336609>
Comment 2 Joseph Pecoraro 2021-04-29 12:53:59 PDT
Looks like:

```
    _startEditingTextNode(textNode)
    {
        if (WI.isBeingEdited(textNode))
            return true;

        var config = new WI.EditingConfig(this._textNodeEditingCommitted.bind(this), this._editingCancelled.bind(this));
        config.spellcheck = true;
        this._editing = WI.startEditing(textNode, config);
        window.getSelection().setBaseAndExtent(textNode, 0, textNode, 1);

        return true;
    }
```

Maybe this just needs `config.multiline = true`.