My scout was on auto-explore near another kingdom's border, and the border expanded around him. So I got the popup about declaring war or negotiating or leaving. Since I knew negotiations at that time weren't going to go anywhere, I selected "leave." But then the popup came up again. And again. And again (ad infinitum). Until I finally declared war, just so I would be able to do something. It appears that the border pop completely surrounded my scout, so he had no legal moves that wouldn't trigger the popup.
So, we need to either be bumped out of borders when such things occur, or allow moving to the border (leaving) not be war.