MediaViewer does not work directly after saving a VisualEditor edit.
Steps to reproduce;
- Open a page in VE mode
- Make an edit
- Save edit
- Click on an image
Result: File page is loaded
Expected result: Image is shown by the MediaViewer
MediaViewer does not work directly after saving a VisualEditor edit.
Steps to reproduce;
Result: File page is loaded
Expected result: Image is shown by the MediaViewer
MediaViewer makes a dictionary of <img> elements on page load (see the constructor and processThumbs() in mmv.bootstrap.js) and cannot handle content added dynamically. (The page parsing logic is crappy anyway and in need of a rewrite - e.g. T77220)
More like tech debt.
How would an application normally react to a VE save? Is there a hook, or an event to listen for?
I don't think there is a VE-specific hook... We do fire wikipage.content. I think @Mooeypoo has had a similar problem before?