Clik general functionality AP9

Hello everyone. I have this problem.
If you normally click on any button - everything works correctly. However, if you click with a short drag, which happens mainly on tablets or phones - the button not working. I can solve this problem with javascript. However, I don’t want to write a separate event for each button. Is there any global solution to solve this problem?

You can Try on any button. Přess the button and make short drag befor mouse up.

Users often click like this and then it looks like an error.

Thanks in advance for your ideas.

1 Like

@mpluky - I can replicate what you describe above.
Please do not think me rude for saying this but I might say that this is really more a user problem than a designer problem.

I do commend you for trying to remedy the issue from within but I wonder if it really would be best for the learner - who will likely come across other projects where this type of error checking is not put in place - to improve their ability to simply click/tap without dragging.

I am curious though - you say that it looks like an error. Do you have some sort of action that is triggering on failure to click? I would see greater need to rectify the issue in that case - but I still see it as user issue.

I wonder if - in a future version - that there was a separate action for mousedown and mouseup so that if you do drag a little but mouseup while still over the button that it would work fine…?

It sounds like you have a working solution already - though I might suggest you’re not obligated to implement - but I would be curious as well to know if there is another answer here. I look forward to what staff has to say.

1 Like

My customer is right. AP button is behaving little incorrectly. If you click in the browser (in normal HTML) on any button (Input type button or a href) and at the same time do a short drag and then mouse up, the action will be executed. In AP not. I think… Thre behavior of the buttons in the standard browsers must really be considered as standard.

Browser: hold mouse down → do short drag in the button the area → leave mouse up (working)
AP: hold mouse down → do short drag in the button the area → leave mouse up (not working)

I already have several cases where students report that they have to click multiple times :frowning:


1 Like

You know - the more I reflect on this - I totally agree.

I have seen this many times in my own projects.
It usually happens to me when I am testing and am trying to move quickly.

Is your JavaScript solution to implement a mouseup listener? Or what are you doing there?

I wonder about using a generic code snippet that will fetch the name of the button so that the exact same code can be used for all buttons.


1 Like

Now I have a very simple… one button solution.

var button = prez.object(‘START’);

$(button.node).on(‘pointerup’, function() {

setTimeout(function() {
prez.runAction(‘CONTINUE’,{}, e); // My Own Action
}, 200);


I haven’t thought of a universal solution yet…


1 Like


For your information, with HTML elements, mouse down and then mouse up within the element area will have a click event, regardless of whether there is drag or not between mouse down and up.
However, in addition to clicking, objects in ActivePresenter can be dragged to select text or have swipe events, etc. so we set a limit on dragging beyond the limit, a click will not occur.
Users can reset this limit by adding a script to the project On Load event, for example, allowing a 5px drag still counts as a click:
AP.ClickMaxDistance = 5;

Hope this helps.


…and this post wins the Internet today!


If the element is a drag drop, it should some distance have a limit. But if the element has a click , it must not have any limit… I thing…

AP.ClickMaxDistance = 50;
Maybee I negatively affect the dragndrop functionality of objects by setting it?

Thanks Lukas


An ActivePresenter object can handle many events simultaneously, so it is not worth checking the limit when using only clicks.
Furthermore, this is to create a good experience for users when they use the click event. It doesn’t affect anything else.

For example, if you set the max distance as 50, dragging or swiping works ok.
Only dragging within 50px will still have a click event.
This may bring not a good experience to users.


now it works fine
:grinning: thanks

1 Like