add enter function

show popup only when enter() return true