Hi Greg. I use graphically-designed images in WebCanvas controls as buttons, to give the UI a professional look. The problem is the framework has issues, and there is no Clicked event like on a normal button: if I click on a WebCanvas button, I use the MouseUp event to do the action required. If I double-click a WebCanvas button, the MouseUp event fires sometimes once, sometimes twice and the DoubleClick event may also fire. So a user double-click actions the button twice. So, I use a Boolean property, Session.ButtonPressed, when a MouseUp happens, like this, to stop code running twice on a double-click:
If not Session.ButtonPressed then
Session.ButtonPressed = True
// do stuff here
Session.ButtonPressed = False
EndIf
However, I have also found that Session.ButtonPressed sometimes does not get reset to false (maybe by accident by me or by an issue if the code needs another web page or dialog to appear) and so sometimes nothing works when you click on it as Session.ButtonPressed is always True. So I have a timer that runs every second or so to set Session.ButtonPressed back to False and this overcomes this issue and the interface always works. It is a little messy but it works really well and the interface is solid and looks really good.
Unless I can think of a cunning workaround, the Popup Menu issue makes it impossible to use my web app using Firefox. What happens is that the popup appears, and you can move the thumbnail, but then it resets itself every second or so. For a very long list, it makes it so frustrating it is unusable. This issue did not happen before I implemented the timer but I did not make the connection. When I came across this post, I understood immediately what the problem is.
The popup menu works fine in IE, Chrome and Safari for Windows. Not so much in Firefox.
Thanks Michel, that’s good to know. My timer is actually on a webPage that is always active, different to the webPage that the Popupmenu is on, which makes it more surprising.
[quote=126087:@Michel Bujardet]I confirm the bug under Windows 8.1, and have filed a report :
35155 - WebPopupMenu drop down jumps when a webtimer on the webpage[/quote]
Michel, do me a favor. When you go to file a bug report, do a search first. I just searched for
[quote=126092:@Greg O’Lone]Michel, do me a favor. When you go to file a bug report, do a search first. I just searched for
webtimer webpopupmenu
and found a duplicate.[/quote]
Sorry, I did not find it with the keywords I used. Next time I will do a broader search.[quote=126094:@Tim Hare]But it no longer runs client-side. Different functionality.[/quote]
I should have pointed it out. That is why the bug is gone, though. The issue is obviously with the client side timer implementation that interferes with the WebPopupMenu.
I never pretended this was the absolute weapon. You do have to find whatever compromise between what is available and what you want to achieve… Now you have another choice than WebPopupMenu OR WebTimer.
[quote=128691:@Eric Gibbon]
Yes, that changes it so that my interface does not work, so the suggestion may fix the popup glitch but is no good for me.
Hi Greg, the WebTimer just does the following:
Session.ButtonPressed = False[/quote]
Eric, I am sorry, but fail to see how using a server side Timer instead of a client side timer to change a session property which is by definition server side may change anything. Have you simply tested ?
Hi Michael, I have tested this thoroughly. The web popupmenu does not work when the timer is there, and does work when it is not. It is very odd. Only does not work in Firefox, works fine in Safari, IE and Chrome.
I confirm, the WebTimer blocks the PopupMenu. My question was after you posted what it did (just setting a variable), why you had said that using instead a server side Timer (NOT a WebTimer) made your interface not work. Using a Timer instead of a WebTimer should set the boolean fine.
No, it does not generate much traffic. But was not the problem that you used a WebTimer (client side) to update your session.ButtonPressed property, and the WebTimer broke the PopupMenu ?
If you use a Timer (server side) to update the session.ButtonPressed, it should generate no traffic since both reside on the server.
Hi Michel, thanks for your help - I have got them the wrong way around in my mind! I thought a WebTimer was on the server and a Timer was on the client. I did try the Timer and it locked the interface. I will look at it again and get back to you, maybe I made a mistake.