WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
16301
Gmail: Canceling an Edit Link dialog applies a link to the first line of selected text
https://bugs.webkit.org/show_bug.cgi?id=16301
Summary
Gmail: Canceling an Edit Link dialog applies a link to the first line of sele...
Justin Garcia
Reported
2007-12-04 20:19:23 PST
In GMail, when I create two paragraphs of text, select them, click Edit Link, and then cancel the Edit Link dialogue, the first paragraph is made into a link. When the Edit Link dialogue appears, GMail creates a link from the selection with document.execCommand("CreateLink", ...), and then when I cancel the dialogue, GMaill tries to remove the link by removing the last anchor in the selection. This won't always unlink the entire selection because we sometimes create multiple anchor elements during CreateLink to preserve the structure of the selection. For example imagine selecting 'foo' and 'bar' below: foo<ul><li>bar</li><li>baz</li></ul> and performing CreateLink. WebKit will create two anchor elements since there is no way to insert only one that contains the entire selection but does not require splitting the list. You could fix this issue by calling document.execCommand("Unlink") on the selection if the user cancels out of the Edit Link dialogue. <
rdar://problem/5616266
> Gmail: Clicking Cancel in Edit Link dialog applies a link to the first line of selected text
Attachments
Add attachment
proposed patch, testcase, etc.
Justin Garcia
Comment 1
2008-05-20 17:18:23 PDT
This looks fixed.
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