Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 370171

Summary: textmatestyler does not work with IE7
Product: [ECD] Orion Reporter: Felipe Heidrich <eclipse.felipe>
Component: EditorAssignee: Mark Macdonald <mamacdon>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon
Version: 0.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Felipe Heidrich CLA 2012-01-30 16:59:28 EST
the javascript code in 
org.eclipse.orion.client.editor >> web >> orion >> editor >> textMateStyler.js
is not compatible with IE7

1) one problem is accessing string using
var chr = str[i];
the correct form is:
var chr = str.charAt(i);

2) can't count that JSON exists, this method is broken
/** @private */
copy: function(obj) {
	return JSON.parse(JSON.stringify(obj));
},

Note that textmate styler won't work on any IE (including 9) if its html has this line:
<meta content='IE=EmulateIE7' http-equiv='X-UA-Compatible'/>
an example of webpage that always sets that is blogspot.com
Comment 1 Mark Macdonald CLA 2012-03-02 10:31:10 EST
Also Array.prototype.indexOf does not exist in IE7 mode. What a nightmare
Comment 2 Mark Macdonald CLA 2012-03-02 15:36:55 EST
I have a fix on this branch. This lets you run the TextMateStyler in IE7 mode.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?h=bug370171_tms_ie7

I did not merge this into master because the monkey patching is ugly.
Comment 3 Mark Macdonald CLA 2012-04-18 13:35:51 EDT
(In reply to comment #2)
I merged the 'charAt' and 'JSON' related changes to master, because they are reasonable regardless of whether we support IE7 or not.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=75ef765bdfe80db0a0be7fb2f8f39f690d2c77ad

I moved the 'indexOf' monkey patch to a JavaScript 1.6 shim, but I did not merge the shim into master, since I'm not sure if IE7 support is critical enough to warrant including it.
Comment 4 Mark Macdonald CLA 2013-08-27 09:58:31 EDT
IE7 is dead *balloons drop from ceiling*

No one seems to care about this so I'm closing it.