When i click on the button for some reason the cursor disappears. When i tried to debug this it turned out that the Release event is being called whenever i click on the button despite not release the key.
never mind. I had to set is focusable to false on the button and change the input mode to Game and UI instead on UI only