diff options
author | Valerio Virgillito | 2012-06-25 16:37:06 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-06-25 16:37:06 -0700 |
commit | 96e1bb2a8d842dc37e4982a273a5bde48f6944c3 (patch) | |
tree | b21bb4aa8efaff3105456a0a403343ef1ed76ab7 /js/mediators | |
parent | 4e5331c9967d4a24df56160188cc916a4051052b (diff) | |
download | ninja-96e1bb2a8d842dc37e4982a273a5bde48f6944c3.tar.gz |
Fix for IKNINJA-1615: Enable mouse up event on top of the user document scrollbar
Chrome has a bug where mouse up does not fire when the mouse is released on top of a scrollbar. To work around this issue, I temporary increase the canvas to cover the scrollbar when drawing and then shrink it back on mouse up.
Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/mediators')
-rwxr-xr-x | js/mediators/mouse-mediator.js | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/js/mediators/mouse-mediator.js b/js/mediators/mouse-mediator.js deleted file mode 100755 index 4d1fb62a..00000000 --- a/js/mediators/mouse-mediator.js +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | |||
7 | var Montage = require("montage/core/core").Montage, | ||
8 | Component = require("montage/ui/component").Component; | ||
9 | |||
10 | exports.MouseMediator = Montage.create(Component, { | ||
11 | hasTemplate: { | ||
12 | value: false | ||
13 | }, | ||
14 | |||
15 | deserializedFromTemplate: { | ||
16 | value: function() { | ||
17 | document.addEventListener("mouseup", this, false); | ||
18 | } | ||
19 | }, | ||
20 | |||
21 | handleMouseup: { | ||
22 | value: function(event) { | ||
23 | |||
24 | if(event._event.target.id !== "drawingCanvas") { | ||
25 | NJevent( "appMouseUp"); | ||
26 | } | ||
27 | |||
28 | return true; | ||
29 | } | ||
30 | } | ||
31 | }); | ||