Skip to content

Commit afbe60f

Browse files
hansonrhansonr
authored andcommitted
fix for mouseupout not trigging Java event
1 parent 227b8b2 commit afbe60f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sources/net.sf.j2s.java.core/srcjs/js/j2sApplet.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// J2S._version set to "3.2.4.07" 2019.01.04; 2019.02.06
44

5+
// BH 2019.08.29 fixes mouseupoutjsmol not firing MouseEvent.MOUSE_UP
56
// BH 5/16/2019 fixes POST method for OuputStream
67
// BH 2/6/2019 adds check for non-DOM event handler in getXY
78
// BH 1/4/2019 moves window.thisApplet to J2S.thisApplet;
@@ -1843,7 +1844,7 @@ if (ev.keyCode == 9 && ev.target["data-focuscomponent"]) {
18431844
ev.preventDefault();
18441845
}
18451846

1846-
var newid = (J2S._mouseOwner && J2S._mouseOwner.isDragging ? 506 : 503);
1847+
var newid = (id == 502 ? 502 : J2S._mouseOwner && J2S._mouseOwner.isDragging ? 506 : 503);
18471848
// MouseEvent.MOUSE_DRAGGED : MouseEvent.MOUSE_MOVED
18481849

18491850
var isTouch = (ev.type == "touchmove");
@@ -1859,7 +1860,7 @@ if (ev.keyCode == 9 && ev.target["data-focuscomponent"]) {
18591860
if (!xym)
18601861
return false;
18611862

1862-
if (lastDragx == xym[0] && lastDragy == xym[1])
1863+
if (id != 502 && lastDragx == xym[0] && lastDragy == xym[1])
18631864
return false;
18641865
lastDragx = xym[0];
18651866
lastDragy = xym[1];

0 commit comments

Comments
 (0)