Actually hitting escape or clicking the x button acts as if the "no" button was pressed (ie the syntax is changed but nit the content). Opening another jira.
Created XWIKI-23261 instead