[BUG 1.5.6] - HTML Links need multiple clicks
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.
Posts that do not conform to the READ ME FIRST sticky thread are subject to deletion.
-
- Cave Troll
- Posts: 36
- Joined: Sat May 19, 2012 3:41 pm
[BUG 1.5.6] - HTML Links need multiple clicks
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.
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.
Re: [BUG 1.5.6] - HTML Links need multiple clicks
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.)
(I'm shooting in the dark here, but MapTool is quite capable of this.)
-
- Cave Troll
- Posts: 36
- Joined: Sat May 19, 2012 3:41 pm
Re: [BUG 1.5.6] - HTML Links need multiple clicks
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.
Re: [BUG 1.5.6] - HTML Links need multiple clicks
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.
Not sure if there is a fix for it, unfortunately.
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
- 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
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.
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."
-
- Cave Troll
- Posts: 36
- Joined: Sat May 19, 2012 3:41 pm
Re: [BUG 1.5.6] - HTML Links need multiple clicks
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.
Re: [BUG 1.5.6] - HTML Links need multiple clicks
Interesting. I was under the impression that the bug was a java swing issue: https://bugs.openjdk.java.net/browse/JDK-4494156RevenantBob wrote: ↑Fri Nov 15, 2019 9:10 amIt wasn't an issue in 1.4 no. It's definitely an artifact of 1.5.
I wonder what changed form 1.4 to 1.5 that broke the HTML links? Maybe 1.4 used something else beside JEditorPane?
Have you tried moving the mouse vs not moving the mouse while clicking?RevenantBob wrote: ↑Fri Nov 15, 2019 9:10 amI just don't know the cause and consistent method of reproducing.
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
Re: [BUG 1.5.6] - HTML Links need multiple clicks
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.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- 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
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":
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."
Re: [BUG 1.5.6] - HTML Links need multiple clicks
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.
The later never works for me, while the former always work. But maybe there is some other problem beside that.
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
- 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
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."
Re: [BUG 1.5.6] - HTML Links need multiple clicks
You technically can't move mouse after any hyperlink click because it will attempt to highlight or drag-drop text.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: [BUG 1.5.6] - HTML Links need multiple clicks
@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
https://github.com/RPTools/maptool/pull/697
Re: [BUG 1.5.6] - HTML Links need multiple clicks
Thank you - I'm glad you could confirm the problem on your end.Full Bleed wrote: ↑Mon Dec 09, 2019 9:39 amYou are correct. Any movement creates a condition that fails to register the click on macrolinks (both text and image links.)
They do, actually.Full Bleed wrote: ↑Mon Dec 09, 2019 9:39 amBut, 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.
Right now it uses the addHyperlinkListener of JEditorPane (HyperlinkEvent.EventType.ACTIVATED). Which is bugged as described in the link I posted earlier.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
Maybe we could make our own listener for the hyperlink? I'm not sure.
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
- 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
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:
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....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.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."