Summary: | Copy and Paste of Javascript from the Inspector doesn't work properly | ||
---|---|---|---|
Product: | WebKit | Reporter: | Gavin Sherlock <gsherloc> |
Component: | Web Inspector (Deprecated) | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | apavlov, ap, bburg, joepeck |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://www.google-analytics.com/urchin.js |
Description
Gavin Sherlock
2006-08-05 14:35:16 PDT
Additional workaround: Use Paste Special, and select Styled Text. However, the syntax coloring is then incorrect, with the colors being shifted forward with respect to the text that they are coloring. I can confirm the behavior, but it's not clear whether the issue is within WebKit. The problem with styled text might well be an entirely separate one (at a first glance, looks like 'ustl' clipboard flavor is generated incorrectly). Is this an issue with the Web Inspector's code views? Alas, there is no syntax coloring in the Web Inspector's view of the code, so the bug is now irrelevant. However, loss of syntax coloring is a step backwards. Should I file a bug on that? It would also be nice if the javascript code were pretty printed in the Web Inspector - should I file a bug for that too? I should note that I was testing with r33475 in case this behavior has changed since then (though this was the latest downloadable revision). We have bugs about those two issues. Now that we have syntax highlighting again, does it reproduce in the Inspector? Testing with r35814, I still see this bug. For this case, I went to: http://smd.stanford.edu/js/ontology/v1/ExampleProduction.html Selected: http://smd.stanford.edu/js/ontology/v1/OntologyTreeBrowser.js in the Resources list, then copied and pasted, using Paste Special->Styled Text, to Word, the following code snippet: function OntologyTreeBrowser(uid) { this.tree = new YAHOO.widget.TreeView ('treediv'+uid); this.uid = uid; /** now there is a div to store the highlighted id as in div id='highlight'+uid, value= **/ } From this.tree, the syntax highlighting starts to veer off. Updated title to reflect Inspector, rather than Drosera. (In reply to comment #8) > Testing with r35814, I still see this bug. > > For this case, I went to: > http://smd.stanford.edu/js/ontology/v1/ExampleProduction.html > > Selected: > http://smd.stanford.edu/js/ontology/v1/OntologyTreeBrowser.js > > in the Resources list, then copied and pasted, using Paste Special->Styled > Text, to Word, the following code snippet: > > function OntologyTreeBrowser(uid) { > this.tree = new YAHOO.widget.TreeView ('treediv'+uid); > this.uid = uid; > /** now there is a div to store the highlighted id as in div > id='highlight'+uid, value= **/ > > } > > From this.tree, the syntax highlighting starts to veer off. I just played with this in Pages with r49008. It pasted with and without style perfectly in Pages. Is this an issue specific to Microsoft Word? Does anyone have Word and can verify if this is still an issue? It still has the buggy behavior exactly as described in comment #8 with Word 2008 with r49032. I tried with Pages 09, and it kind of works, in that the syntax highlighting is correct, but the text is still pasted as a table, rather than just as lines of styled text. Oddly, copying and pasting the table from Pages then into Word works correctly.... As of r94572, the text is pasted as a single flow, but all leading spaces are not preserved (presumably, due to the fact that all whitespace is collapsed in HTML, unlike ) The inspector now uses CodeMirror as its text editor widget. Please re-open if this is still relevant on recent nightlies. |