Steps to reproduce:
- Go to Insert>Gallery
- Add an image in the Images tab of gallery dialog
- Go to Options tab set "Images per row" as 1
- Click on "Insert"
- Now again open the Gallery dialog
- Observe that it opens the Options tab first inside Gallery dialog, not the first tab "Images" but the last opened tab
- Now switch to Images tab and add an image
- Switch to Options and click on "Images per row"
Observed Result:
Error: Permission denied to access property "parentNode" shows up in the console and clicking on Insert or Cancel on the Gallery dialog crashes VE