[BUG 1.5.6] - HTML Links need multiple clicks

Confirmed bugs should get a single post here. Check the READ ME FIRST sticky thread for the format.

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice, MapTool BugReport Manager

Forum rules
Posts that do not conform to the READ ME FIRST sticky thread are subject to deletion.
RevenantBob
Cave Troll
Posts: 36
Joined: Sat May 19, 2012 3:41 pm

[BUG 1.5.6] - HTML Links need multiple clicks

Post by RevenantBob »

Bug: When creating frames in macros inserting anchor HTML tags sometimes requires multiple clicks to activate.

Reproduction:

I can't consistently reproduce it.

Create a Frame with a link in it and click it. Every once in awhile clicking it does nothing despite the cursor becoming a "Finger".

This is on windows if that help.

taustinoc
Dragon
Posts: 516
Joined: Mon Aug 03, 2015 6:30 pm

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by taustinoc »

I see this happen a lot in a lot of programs. For me, it's usually that the focus has shifted to something else, even somewhere else in the same program, and the first click sets the focus back on what I want to click on.

(I'm shooting in the dark here, but MapTool is quite capable of this.)

RevenantBob
Cave Troll
Posts: 36
Joined: Sat May 19, 2012 3:41 pm

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by RevenantBob »

nah, definitely not that. When it happens, I have to click quite a number of times sometimes. Other players have commented the same on macros that didn't have this problem in the 1.4 line. Not sure if something changed in the HTML views.

Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by Merudo »

It's a problem with java - when the mouse is moving, clicks are not properly registered.

Not sure if there is a fix for it, unfortunately.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by Full Bleed »

I also *feel* like this is happening more with 1.5+. I've usually blamed it on panel focus (as noted earlier in the thread) since it seems to happen more to my players than me (since I know that they are always doing "other stuff" during the game whereas us poor GM's have to be game-focused the entire session.) ;)

It's gotten annoying enough that I've been converting the most used buttons to form buttons now so that there is, at least, more feedback when clicking on something (rather than having them pound on a macrolink until it does something)... so far that seems to be working better... which begs the question of whether it's just "working better" because of the button feedback or because there is an issue with macrolinks.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

RevenantBob
Cave Troll
Posts: 36
Joined: Sat May 19, 2012 3:41 pm

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by RevenantBob »

It wasn't an issue in 1.4 no. It's definitely an artifact of 1.5. I just don't know the cause and consistent method of reproducing.

Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by Merudo »

RevenantBob wrote:
Fri Nov 15, 2019 9:10 am
It wasn't an issue in 1.4 no. It's definitely an artifact of 1.5.
Interesting. I was under the impression that the bug was a java swing issue: https://bugs.openjdk.java.net/browse/JDK-4494156

I wonder what changed form 1.4 to 1.5 that broke the HTML links? Maybe 1.4 used something else beside JEditorPane?
RevenantBob wrote:
Fri Nov 15, 2019 9:10 am
I just don't know the cause and consistent method of reproducing.
Have you tried moving the mouse vs not moving the mouse while clicking?

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by aliasmask »

Afaik, this has always been an issue. I notice it more with links in form frames. Another link related bug is you can activate the link by clicking in the same horizontal space of link. For example, if there is a link with no text after it in the chat or div of line you can click the whitespace after it to activate the link.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by Full Bleed »

aliasmask wrote:
Sat Nov 16, 2019 5:10 pm
Afaik, this has always been an issue. I notice it more with links in form frames.
Well, like the OP suggests, I'm fairly certain that it's worse in 1.5+.

To put it in perspective, in combat I have a particular flow through my "GM Control Sheet" using macrolink image "buttons":

Image

I "Announce Combat" then rotate through the Roll/Sort/Next macrolink buttons for each round. Grayed out macrolinks can't be "clicked". I can "End Combat" only at the end of a round.

So, when managing combat I click on a lot of these macrolinks, and while I can't reproduce the issue of a "failed click" reliably (like the OP) I can say that it certainly seems worse in 1.5+. Previously it seemed to happen pretty rarely for me (and I always wrote it off as a focus-change issue or miss clicking, etc.) Heck, maybe the mouse *was* moving during those times and it's the java issue Merudo has mentioned. But I just know it's happening more often now.

And while it's early days in switching from macrolink buttons to form buttons on my sheet (which I haven't do for this portion of the sheet yet), I can say that the form buttons seem more responsive. In fact, in the short time I've used them I can't think of a single time that I clicked on a form button that it didn't register. So, if the "mouse cursor must be completely still to click" on macrolinks is a thing, it doesn't seem to be the same thing with form buttons. Or my sample size is just too small... *shrug*

Again, if I could reliably reproduce this I'd of mentioned it earlier and provided something to be tested. But I can't and I know that's not much help. I'm just adding my observations to the discussion so the OP's views aren't totally discounted.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by Merudo »

I would appreciate if one of you could test clicking a link while holding the mouse perfectly still VS clicking a link while moving very slowly.

The later never works for me, while the former always work. But maybe there is some other problem beside that.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by Full Bleed »

Merudo wrote:
Sun Dec 08, 2019 9:22 am
I would appreciate if one of you could test clicking a link while holding the mouse perfectly still VS clicking a link while moving very slowly.

The later never works for me, while the former always work. But maybe there is some other problem beside that.
You are correct. Any movement creates a condition that fails to register the click on macrolinks (both text and image links.)

But, using the same testing method (and consistent with my earlier observation), if you click on a Form Button you can be moving the mouse without issue. The button press registers just fine (and there is visual feedback during the click as well.)

That makes it seem like they are using different onClick events.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by aliasmask »

You technically can't move mouse after any hyperlink click because it will attempt to highlight or drag-drop text.

Phergus
Deity
Posts: 7132
Joined: Fri May 12, 2006 8:56 pm
Location: Middle of Nowhere, NM
Contact:

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by Phergus »

@merudo - Does MT directly handle the mouse-click actions for links in dialogs/frames? If so then perhaps the same drag-threshold fix that was done for right-click on tokens needs to be done for left-click.

https://github.com/RPTools/maptool/pull/697

Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by Merudo »

Full Bleed wrote:
Mon Dec 09, 2019 9:39 am
You are correct. Any movement creates a condition that fails to register the click on macrolinks (both text and image links.)
Thank you - I'm glad you could confirm the problem on your end.
Full Bleed wrote:
Mon Dec 09, 2019 9:39 am
But, using the same testing method (and consistent with my earlier observation), if you click on a Form Button you can be moving the mouse without issue. The button press registers just fine (and there is visual feedback during the click as well.)

That makes it seem like they are using different onClick events.
They do, actually.
Phergus wrote:
Mon Dec 09, 2019 11:50 am
@merudo - Does MT directly handle the mouse-click actions for links in dialogs/frames? If so then perhaps the same drag-threshold fix that was done for right-click on tokens needs to be done for left-click.

https://github.com/RPTools/maptool/pull/697
Right now it uses the addHyperlinkListener of JEditorPane (HyperlinkEvent.EventType.ACTIVATED). Which is bugged as described in the link I posted earlier.

Maybe we could make our own listener for the hyperlink? I'm not sure.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: [BUG 1.5.6] - HTML Links need multiple clicks

Post by Full Bleed »

Merudo wrote:
Mon Dec 09, 2019 3:01 pm
Thank you - I'm glad you could confirm the problem on your end.
The weird thing is that it definitely doesn't feel "natural" to click a hyperlink while moving my mouse... and I had to test it a few times because I, instinctively, stop (if even for a fraction of a second) when moving over a hyperlink and clicking. But while that "micro pause" before hitting the button is learned behaviour, it's obviously not long enough some of the time to register within the parameters that MT (java) requires... and, yet, it still feels less forgiving than earlier versions of Maptool. That said, I can't completely rule out other factors (like, I know I moved to a MX Master 2s in the last year, so the speed and sensitivity levels of the mouse might be just different enough to exacerbate the issue over the mouse it replaced.)


Though, I think one of the interesting things about the bug you linked was this:
...hyperlinks will only fire a hyperlinkUpdate (with an HyperlinkEvent.EventType.ACTIVATED event type) if the mouse does not move between the button press and the button release.
That seems to be a slightly different case than I/we are testing for. I couldn't get MT to trigger a hyperlink while the mouse was moving. But the listed bug says the problem is the movement between button click and release. That's much harder to test for because we're moving into the realm of the timing between a single click and click-n-drag territory.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

Post Reply

Return to “Bug Reports”