WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
112626
Removing all content of an input element leaves behind a blank TextNode
https://bugs.webkit.org/show_bug.cgi?id=112626
Summary
Removing all content of an input element leaves behind a blank TextNode
Daniel Freedman
Reported
2013-03-18 14:34:50 PDT
It appears that removing content from an <input> generates a blank TextNode in the ShadowDOM Steps to reproduce: 1. Turn on "Show Shadow DOM" in the inspector 2. Load the example jsfiddle 3. Add content to the <input> 4. Remove the all content with backspace 4. Inspect the shadowed <div> child of the <input>, there is an extra, empty TextNode 5. Repeat steps 3 & 4 6. Now there are two empty TextNodes Highlighting and replacing the text does not seem to generate a blank TextNode, only removing all content.
Attachments
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2013-03-18 14:39:58 PDT
Wait, does Inspector leak the information about input element? It seems like we shouldn't. The fact input element is implemented via contenteditable is an implementation detail that should NOT be leaked from tools like Inspector.
Elliott Sprehn
Comment 2
2013-03-18 14:52:50 PDT
(In reply to
comment #1
)
> Wait, does Inspector leak the information about input element? It seems like we shouldn't. The fact input element is implemented via contenteditable is an implementation detail that should NOT be leaked from tools like Inspector.
Lets discuss that in a different bug.
Alexey Proskuryakov
Comment 3
2013-03-18 16:11:53 PDT
Why is this a bug? Empty text nodes should not be causing any trouble (unless you repeat this thousands of times, which is not a practical scenario).
Elliott Sprehn
Comment 4
2013-03-18 16:15:32 PDT
(In reply to
comment #3
)
> Why is this a bug? Empty text nodes should not be causing any trouble (unless you repeat this thousands of times, which is not a practical scenario).
I don't think it's unreasonable to think that people leave irccloud.com or other web apps open for weeks. Certainly gmail users do.
Alexey Proskuryakov
Comment 5
2013-03-25 15:54:13 PDT
What are the practical scenarios that cause unlimited addition of empty TextNodes on irccloud.com or GMail? I would expect that any time the user does anything meaningful with the text input, like actually sending an IRC message, these nodes would go away. I don't want to over-think it, as this issue can probably probably be fixed without any measurable cost, but it's always good to know when a fix actually improves anything for users.
Elliott Sprehn
Comment 6
2013-03-26 09:58:11 PDT
(In reply to
comment #5
)
> What are the practical scenarios that cause unlimited addition of empty TextNodes on irccloud.com or GMail? I would expect that any time the user does anything meaningful with the text input, like actually sending an IRC message, these nodes would go away. >
That's a really good question, I'll look into this more.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug