forked from josdejong/jsoneditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disabled saving files using HTML5 on Firefox to prevent a Firefox bug
- Loading branch information
Showing
9 changed files
with
34 additions
and
522 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
* Copyright (c) 2011-2013 Jos de Jong, http://jsoneditoronline.org | ||
* | ||
* @author Jos de Jong, <[email protected]> | ||
* @version 2.3.4-SNAPSHOT | ||
* @version 2.4.0-SNAPSHOT | ||
* @date 2013-11-15 | ||
*/ | ||
(function () { | ||
|
@@ -4597,8 +4597,8 @@ ContextMenu.prototype.show = function (anchor) { | |
} | ||
}); | ||
this.eventListeners.mousewheel = util.addEventListener( | ||
document, 'mousewheel', function () { | ||
// hide the menu on mouse scroll | ||
document, 'mousewheel', function (event) { | ||
// block scrolling when context menu is visible | ||
event.stopPropagation(); | ||
event.preventDefault(); | ||
}); | ||
|
@@ -5922,6 +5922,14 @@ util.getInternetExplorerVersion = function getInternetExplorerVersion() { | |
return _ieVersion; | ||
}; | ||
|
||
/** | ||
* Test whether the current browser is Firefox | ||
* @returns {boolean} isFirefox | ||
*/ | ||
util.isFirefox = function isFirefox () { | ||
return (navigator.userAgent.indexOf("Firefox") != -1); | ||
}; | ||
|
||
/** | ||
* cached internet explorer version | ||
* @type {Number} | ||
|
@@ -5943,7 +5951,7 @@ util.addEventListener = function addEventListener(element, action, listener, use | |
if (useCapture === undefined) | ||
useCapture = false; | ||
|
||
if (action === "mousewheel" && navigator.userAgent.indexOf("Firefox") >= 0) { | ||
if (action === "mousewheel" && util.isFirefox()) { | ||
action = "DOMMouseScroll"; // For Firefox | ||
} | ||
|
||
|
@@ -5966,7 +5974,7 @@ util.removeEventListener = function removeEventListener(element, action, listene | |
if (useCapture === undefined) | ||
useCapture = false; | ||
|
||
if (action === "mousewheel" && navigator.userAgent.indexOf("Firefox") >= 0) { | ||
if (action === "mousewheel" && util.isFirefox()) { | ||
action = "DOMMouseScroll"; // For Firefox | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.