Fixed rte popup not closing when clicking cancel

This pull + (coming soon) should solve #8164.

Explaination coming soon too.