fix bug where only last modal would open for every button (in html edit mode)