Closed mattheu closed 7 years ago
Oh, this makes a lot of sense.
I'm wondering if it makes more sense just to move the existing render_edit
hook into the _.defer
callback, so that functions as expected? Currently that hook fires at an indeterminate time which could be before or after the frame is available. Nailing it down to fire once the frame was rendered seems like it would be the desired behavior in any case I can think of.
Moving the current action rather than a new action also makes a lot of sense. I have updated.
Following on from this ticket, I have been talking to @rahulsprajapati about how best to achive what he wanted.
Using
setTimeout
as you suggested works fine, however I think I agree with him that there could be a better solution that guarantees that his code is run at the correct time. Having another actionshortcode-ui.after_set_action_update
would be useful.We currently have an action
shortcode-ui.render_edit
, but shortcake renders the modal content inside adefer
callback. Because of this I think it makes sense to add an extra action.