Bug 27683

Summary: div { display: none; } makes pasting into text fields impossible
Product: WebKit Reporter: ryan.kinal
Component: FormsAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: adele, cshu, darin, enrica, jonlee, michelangelo, morrita, rniwa, rosen.dash, shinyak, tkent, tonikitoo, tony, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://ryankinal.cogia.net/test.php
Bug Depends on: 54179    
Bug Blocks: 66754    
Attachments:
Description Flags
Test HTML file with same source as link. Shows inability to paste.
none
fixes the bug
none
Updated changelog enrica: review+

ryan.kinal
Reported 2009-07-25 14:14:52 PDT
Created attachment 33496 [details] Test HTML file with same source as link. Shows inability to paste. If divs are set to display: none in CSS, you are unable to paste text into <input type="text"> elements or <textarea> elements. See example at http://ryankinal.cogia.net/test.php (source attached).
Attachments
Test HTML file with same source as link. Shows inability to paste. (212 bytes, text/html)
2009-07-25 14:14 PDT, ryan.kinal
no flags
fixes the bug (8.23 KB, patch)
2011-10-28 18:05 PDT, Ryosuke Niwa
no flags
Updated changelog (8.13 KB, patch)
2011-10-28 18:20 PDT, Ryosuke Niwa
enrica: review+
Alexey Proskuryakov
Comment 1 2009-07-25 22:45:39 PDT
Confirmed with r46038.
Alexey Proskuryakov
Comment 2 2009-07-25 22:46:46 PDT
Ryosuke Niwa
Comment 3 2011-10-28 18:05:39 PDT
Ryosuke Niwa
Comment 4 2011-10-28 18:05:48 PDT
Created attachment 112955 [details] fixes the bug
Ryosuke Niwa
Comment 5 2011-10-28 18:20:49 PDT
Created attachment 112956 [details] Updated changelog
Ryosuke Niwa
Comment 6 2011-10-31 23:45:12 PDT
Any reviewers?
Enrica Casucci
Comment 7 2011-11-01 17:44:54 PDT
Comment on attachment 112956 [details] Updated changelog View in context: https://bugs.webkit.org/attachment.cgi?id=112956&action=review > Source/WebCore/editing/ReplaceSelectionCommand.cpp:170 > + restoreAndRemoveTestRenderingNodesToFragment(holder.get()); Could you explain why you've added the statements above? I don't understand. > Source/WebCore/editing/ReplaceSelectionCommand.cpp:187 > + restoreAndRemoveTestRenderingNodesToFragment(holder.get()); Ditto.
Ryosuke Niwa
Comment 8 2011-11-01 17:48:12 PDT
Comment on attachment 112956 [details] Updated changelog View in context: https://bugs.webkit.org/attachment.cgi?id=112956&action=review >> Source/WebCore/editing/ReplaceSelectionCommand.cpp:170 >> + restoreAndRemoveTestRenderingNodesToFragment(holder.get()); > > Could you explain why you've added the statements above? I don't understand. I had to move the statements in lines 182-187 here because otherwise it would interfere with the way handleBeforeTextInsertedEvent calculates the current length. The change log comment "In addition, remove the node before dispatching beforeTextInserted event to avoid event listeners, in particular TextFieldInputType::handleBeforeTextInsertedEvent, from seeing the test node." corresponds to this point. >> Source/WebCore/editing/ReplaceSelectionCommand.cpp:187 >> + restoreAndRemoveTestRenderingNodesToFragment(holder.get()); > > Ditto. This code had to added because 182-187 had to be moved above editableRoot->dispatchEvent(evt, ec).
Enrica Casucci
Comment 9 2011-11-02 09:21:42 PDT
Comment on attachment 112956 [details] Updated changelog Thanks for the explanation. Looks good to me.
Ryosuke Niwa
Comment 10 2011-11-02 09:44:14 PDT
Thanks for the review!
Ryosuke Niwa
Comment 11 2011-11-02 10:12:11 PDT
Alexey Proskuryakov
Comment 12 2011-11-03 10:24:37 PDT
This caused bug 71483.
Note You need to log in before you can comment on or make changes to this bug.