How to detect a click while still being able to drag the object?

I’m making a draggable object that takes you to another screen when clicked, the problem is that when you click the object, it instantly takes you to the next screen.
I’m using the pointerdown event for the click and drag event for dragging the object, and I need both to work.
Do I need to change the pointerdown event to another? or do I have to put some kind of delay or something?

I solved it! I just used a boolean variable with a timeout to differentiate between a click and a drag:

    let timeClicked;
    this.input.on('dragend', (pointer, obj, dragX, dragY)=>{
        setTimeout(()=>{
            timeClicked = false;
        },500);
    })
    EnterTable[i].on(EVENTS.POINTER_UP, () => {
                if(!timeClicked) {
                    //Code for click event
                }
    })