Bug 8817
Summary: | REGRESSION: TinyMCE: Clicking on a link has no effect | ||
---|---|---|---|
Product: | WebKit | Reporter: | Justin Garcia <justin.garcia> |
Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | ian |
Priority: | P1 | Keywords: | InRadar, Regression |
Version: | 420+ | ||
Hardware: | Mac | ||
OS: | OS X 10.4 | ||
URL: | http://tinymce.moxiecode.com/example.php?example=true | ||
Bug Depends on: | |||
Bug Blocks: | 7156 |
Justin Garcia
When you hover over a link inside the editable region, the href that appears in the status bar is correct, but when you click on the link nothing happens and the status bar text changes to Run script: "void(0);"
We think this is a regression in TinyMCE's sources.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Timothy Hatcher
This might not be a regression in TinyMCE but an intentional change to prevent bug 7156. This might install an click handler that calls void(0) to prevent the navigation. It is hard to say by looking their whitespace-stripped script file.
Alice Liu
<rdar://problem/4575096>
Darin Adler
(In reply to comment #1)
> It is hard to say by looking their whitespace-stripped script file.
Full source to TinyMCE is at their website, so someone should look at that and verify that this is intentional on their part.
David Carson
Both Opera 9.0 and FF 1.5.0.4 exhibit similar behaviour. Clicking the link does nothing. FF and Safari ToT does allow you to right click the link and open in new window/new tab, which opens the link to sourceforge.
Checking the code, it seems that the experience behaviour is correct. Here is the code that handles link selection in MCE:
// Patch the darned link
if (lnk && e.type == "mousedown") {
lnk.setAttribute("mce_real_href", lnk.getAttribute("href"));
lnk.setAttribute("href", "javascript:void(0);");
}
// Patch back
if (lnk && e.type == "click") {
window.setTimeout(function() {
lnk.setAttribute("href", lnk.getAttribute("mce_real_href"));
lnk.removeAttribute("mce_real_href");
}, 10);
}
As can be seen, javascript:void(0) is correct.
David Carson
Not a bug