Check if you used Z index in button tag may be you have in mind that after
I clicked button, the button will go -1 so, we can easily hide the button by
overlay of the desired element you need to place at z - index:1.
In simple words, You may think you need to hide the button if the button is
pressed and a other div or p tag must come over it.
If you do that your ideology is right I mean that It will be z=-1.SO, the
element gets hidden task completed. But the thing is the buttom will become
unclickable at 'Certain parts', it specifically clickable at right or left top corner.
Just imagine a co-ordinate system of (x,y,z) if you put your index -1 then
it will be on negative side of the system.To visualize or understand
what I am saying. Just consider a cornor in your house it has an upright
axis or (the line that is moving towards the top) Z(our concern). The three
lines meet at a point called origin. in our assumpation the corner of our house
from which lines orginate. so let us give values to z axis consider z=1
(distance of z=1) when z=-1 it is the backside of the corner. that is you
are looking the corner from positive side, the negative side of corner cant be
seen by you because it backside. In 2 dimensional window there is no backside
so we need to use a good old trick that is say we draw a person is watching a bird
coming from long distance in order to get that optical illusion that to say the bird long away
we usually draw the bird smaller such that the observer feel it is kind of 3d.
Excat senario happens in browser window but this time the click function
that is associated with buttom is becoming smaller rather than the button itself
So if you read this completely you will know how "Z-INDEX WORKS".
In short "Remove Z-index".if you have it.