Bug 10177 - REGRESSION: Successfully dragging text into a disabled field
Summary: REGRESSION: Successfully dragging text into a disabled field
Status: VERIFIED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: Nobody
URL:
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2006-07-31 18:12 PDT by Craig St. Jean
Modified: 2006-08-05 12:34 PDT (History)
2 users (show)

See Also:


Attachments
Manual test case (114 bytes, text/html)
2006-07-31 18:51 PDT, Mark Rowe (bdash)
no flags Details
Patch, including change log, layout test, and a change to DRT to make the test work (35.41 KB, patch)
2006-08-01 11:13 PDT, mitz
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Craig St. Jean 2006-07-31 18:12:07 PDT
1) Go to report a new bug
2) Double click UNCONFIRMED
3) Click and hold for a second over it so you can drag
4) Drop it into Assign To (a read-only field)

The text will appear in that field now

Tested on latest nightly as of 9:10PM Jul 31 2006
Comment 1 Mark Rowe (bdash) 2006-07-31 18:49:55 PDT
Confirmed with r15718.
Comment 2 Mark Rowe (bdash) 2006-07-31 18:51:34 PDT
Created attachment 9785 [details]
Manual test case

This manual test case is here so that people with higher privileges within Bugzilla can see the issue.  Select  the text that says 'Drag me!' and drop it into the text field.  The drop should be rejected.
Comment 3 Mark Rowe (bdash) 2006-07-31 22:48:51 PDT
Updating keywords.
Comment 4 mitz 2006-08-01 08:41:21 PDT
Dragging is allowed since the user-modify property of the text field's inner div is set according to the rule
element->isReadOnlyControl() ? READ_ONLY : READ_WRITE_PLAINTEXT_ONLY
(appearing in two places in RenderTextControl). The fix may be as simple as changing it to
element->isReadOnlyControl() || element->disabled() ? READ_ONLY : READ_WRITE_PLAINTEXT_ONLY
Comment 5 mitz 2006-08-01 09:09:24 PDT
Changing bug summary. Read-only fields (having the readonly attribute) actually behave correctly :-)
Comment 6 mitz 2006-08-01 11:13:05 PDT
Created attachment 9794 [details]
Patch, including change log, layout test, and a change to DRT to make the test work
Comment 7 Adele Peterson 2006-08-01 11:36:44 PDT
Comment on attachment 9794 [details]
Patch, including change log, layout test, and a change to DRT to make the test work

looks good, r=me
Comment 8 Darin Adler 2006-08-01 11:37:52 PDT
Comment on attachment 9794 [details]
Patch, including change log, layout test, and a change to DRT to make the test work

Looks good. r=me
Comment 9 Darin Adler 2006-08-01 11:39:41 PDT
Double review! Twice the fun!
Comment 10 Darin Adler 2006-08-03 08:27:57 PDT
Committed revision 15768.