WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
Bug 94833
Setting the value of textarea on an input event prevents new line to be inserted subsequently
https://bugs.webkit.org/show_bug.cgi?id=94833
Summary
Setting the value of textarea on an input event prevents new line to be inser...
Ryosuke Niwa
Reported
2012-08-23 12:26:59 PDT
http://code.google.com/p/chromium/issues/detail?id=76516
1. Open the following HTML file. 2. Open Console. 3. Press ENTER, notice the console log shows the newline. Press ENTER again, notice the textarea's value no longer receives the newline. <html> <body> <textarea oninput="console.log('[' + this.value + ']'); this.value = '';"></textarea> </body> </html> What is the expected result? [ ] [ ] What happens instead? [ ] []
Attachments
Add attachment
proposed patch, testcase, etc.
Kent Tamura
Comment 1
2012-10-01 00:31:29 PDT
For the second ENTER, TypingCommand::insertLineBreak rejects to work because canAppendNewLineFeedToSelection(endingSelection()) returns false. endingSelection() for the second ENTER is: SE#text 0x7feb01516530 "\n" start: legacy, offset, offset:0 end: legacy, offset, offset:0 though endingSelection() for the first ENTER was: BODY 0x7feb031705f0 #text 0x7feb031a80f0 " " TEXTAREA 0x7feb0316ee40 #shadow-root 0x7feb031744d0 SE DIV 0x7feb03171880 start: legacy, offset, offset:0 end: legacy, offset, offset:0 endingSelection() is pointing the text node removed by this.value='' ?
danya.postfactum
Comment 2
2012-11-27 21:47:45 PST
Is it hard to fix this issue? Sorry I have no experience in C++ (?)
danya.postfactum
Comment 3
2013-09-26 08:08:19 PDT
This issue is not reproducible anymore in Google Chrome, but I am not sure this is fixed in webkit yet rather then in blink. Can anybody test this again?
Ryosuke Niwa
Comment 4
2013-09-29 23:46:35 PDT
The bug doesn't seem to reproduce on nightly builds of WebKit anymore.
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