Closed mattheu closed 7 years ago
This fixes both of the bugs noted. I hadn't even noticed the router showing up on the shortcode frame, but that has been an issue for a long time now... thanks!
The only question I have, in looking over the code, is whether there's any reason that MediaController.reset()
and MediaController.resetState()
need to be kept as separate methods. It looks like with one exception, whenever we call one, we're also calling the other one. And here, where we're setting the media controller before rendering the insert frame of the window, it would make just as much sense to reset the state as well.
If it makes sense to keep the two actions separated, that's totally fine. I'm just wondering if they can be combined into one method for simplicity though.
The only question I have, in looking over the code, is whether there's any reason that MediaController.reset() and MediaController.resetState() need to be kept as separate methods.
Agreed. Not sure why I did it like that :)
@goldenapples Updated this to consolidate the 2 methods.
Wait a sec - I spoke too soon. It looks like the specs.js file isn't updated in the last build commit. I'm not sure why that is. If you can rebuild it here, that'd be great. Otherwise, we can just build it on master...
specs.js file isn't updated
This file is a little out of date and I see a few changes unrelated to this change. I will open a new PR to recompile everything as I"m also seeing CSS changes.
@mattheu Can you merge in the latest master and finish off this PR, so we can push this fix in a new patch release? If you're busy right now, I can finish it up for you... just let me know.
Will do. I had forgotten this one wasn't merged.
@goldenapples Merged with master - ready to go.
Nice. I checked in the updated specs file to make sure that tests still pass - they do. I'll merge this now.
I ran into a couple of bugs with the modal state.
The first is that the media library / upload tabs show when opening the modal for a second time. This bug has been present since before the last release.
Steps to reproduce:
X
in top rightAs can be seen in the screenshot, these tabs should not be visible.
The second issue is that after editing an exsisting shortcode, the state is not correctly reset on close.
Steps to reproduce.
You see the following screen. I expect to see the grid of shortcodes I can insert. The media frame state was not correctly reset on close.