leaningtech / cheerpj-meta

Run Java 8 applications, libraries, applets, Java Web Start, and Oracle Forms on the web without legacy plugins.
https://labs.leaningtech.com/cheerpj
445 stars 21 forks source link

event.isShiftDown() broken #122

Closed msdemlei closed 3 years ago

msdemlei commented 3 years ago

In CheerpJ-compiled code, the isShiftDown() method of MouseEvents appears to be broken, at least on Chromium as of Debian buster; in a clicked handler:

e.isShiftDown()

always returns false for me, regardless of the actual state of the modifier keys.

In case you cannot reproduce it, I'm happy to investigate this further.

marsicplusplus commented 3 years ago

Hi @msdemlei,

This has been fixed in one of our recent build.

You can try this runtime: https://cjrtnc.leaningtech.com/20201231/loader.js

without the .jar.js file (let the runtime perform the conversion).

msdemlei commented 3 years ago

On Fri, Mar 26, 2021 at 08:06:41AM -0700, Lorenzo wrote:

This has been fixed in one of our recent build.

You can try this runtime: https://cjrtnc.leaningtech.com/20201231/loader.js

Thanks for the fix, but... no luck, I'm afraid; the new runtime now fails some assertions it hasn't failed for me in 2.1, in particular

assert(fileData.cacheRefCount == 0);

in loader.js, line 1841, and then I don't seem to get Clicked events at all (Dragged events get through, but there's something fishy there, too, as background restauration doesn't happen any more).

In case you are curious, the thing where this (and the scroll bar problem) fails is (something like) this:

https://dc.zah.uni-heidelberg.de/dexter/ui/ui/custom/halogas/edit/0

where a shift-click should do the same as a middle-click: remove a point set by clicking first.

marsicplusplus commented 3 years ago

Hi @msdemlei,

Both the mouse issue and the assert should be fixed with this:

https://cjrtnc.leaningtech.com/20200419/loader.js

Remember that you can´t use the previously generated .jar.js with this new runtime.

msdemlei commented 3 years ago

On Mon, Apr 19, 2021 at 04:12:06AM -0700, Lorenzo wrote:

Both the mouse issue and the assert should be fixed with this:

https://cjrtnc.leaningtech.com/20200419/loader.js

Remember that you can´t use the previously generated .jar.js with this new runtime.

Ah... because Bug #121 was so bad that people kept complaining, I've ported the source to Swing, which took with it the offending piece of code. Hence, it'd be something of a hassle for me to verify your fix. I'll still do so if you ask me to.