Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Reverting the windows scroll fix put in by Marcel Gerber via #10930
Browse files Browse the repository at this point in the history
  • Loading branch information
nethip committed May 11, 2016
1 parent 6b0abe8 commit 22319cd
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,32 +437,6 @@ define(function (require, exports, module) {
}
}, true);

// on Windows, cancel every other scroll event (#10214)
// TODO: remove this hack when we upgrade CEF to a build with this bug fixed:
// https://bitbucket.org/chromiumembedded/cef/issue/1481
var winCancelWheelEvent = true;
function windowsScrollFix(e) {
winCancelWheelEvent = !winCancelWheelEvent;
if (winCancelWheelEvent) {
e.preventDefault();
e.stopImmediatePropagation();
}
}

function enableOrDisableWinScrollFix() {
window.document.body.removeEventListener("wheel", windowsScrollFix, true);
if (PreferencesManager.get("_windowsScrollFix")) {
window.document.body.addEventListener("wheel", windowsScrollFix, true);
}
}

if (brackets.platform === "win" && !brackets.inBrowser) {
PreferencesManager.definePreference("_windowsScrollFix", "boolean", true, {
excludeFromHints: true
}).on("change", enableOrDisableWinScrollFix);
enableOrDisableWinScrollFix();
}

// Prevent extensions from using window.open() to insecurely load untrusted web content
var real_windowOpen = window.open;
window.open = function (url) {
Expand Down

0 comments on commit 22319cd

Please sign in to comment.