| Summary: | [editor] [Chrome] NPE when using mouse wheel | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | Client | Assignee: | Felipe Heidrich <eclipse.felipe> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | eclipse.felipe, Silenio_Quarti |
| Version: | 0.2 | ||
| Target Milestone: | 0.2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Mark Macdonald
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. |