Modified button handler to ignore default browser behavior.