Community
Participate
Working Groups
Orion 0.2 M7 1. Using Chrome, go to /examples/minimaleditor.html 2. Use the mouse wheel to scroll up and down. 3. You'll get a bunch of errors like this: Uncaught TypeError: Cannot read property 'lineIndex' of null editor.js:1964 Editor._handleMouseWheel editor.js:1964 Editor._hookEvents.handlers.push.handler editor.js:3522
This code is wrong: if (isSafari) { var lineDiv = e.target; while (lineDiv.lineIndex === undefined) { lineDiv = lineDiv.parentNode; } this._mouseWheelLine = lineDiv; } it should be: if (isSafari) { var lineDiv = e.target; while (lineDiv && lineDiv.lineIndex === undefined) { lineDiv = lineDiv.parentNode; } this._mouseWheelLine = lineDiv; } That said, this should not be your problem since this code only runs on Safari and you are on Chrome. Unless isSafari is set wrong.
> That said, this should not be your problem since this code only runs on Safari > and you are on Chrome. Unless isSafari is set wrong. Running Chrome (11.0.696.60) > navigator.userAgent > "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24" I guess mentioning Mozilla, WebKit, Gecko and Chrome wasn't enough, they had to throw in Safari too ;)
(In reply to comment #2) > > That said, this should not be your problem since this code only runs on Safari > > and you are on Chrome. Unless isSafari is set wrong. > Running Chrome (11.0.696.60) > > navigator.userAgent > > "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24" > I guess mentioning Mozilla, WebKit, Gecko and Chrome wasn't enough, they had to > throw in Safari too ;) That explains why isSafari is set. Our user agent detection code is pretty weak in the editor: var isSafari = navigator.userAgent.indexOf("Safari") !== -1;
I fixed the null pointer http://git.eclipse.org/c/e4/org.eclipse.orion.client.git/commit/?id=d3e097cef549088e353b3ad3dc056a9495c037dd I filed Bug 344749 to track the problem(s) in our user agent detection code.