Skip to content

Commit

Permalink
fix settings head editor init is buguy
Browse files Browse the repository at this point in the history
  • Loading branch information
lexoyo committed Feb 27, 2024
1 parent eed8847 commit 02e2641
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ts/client/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ export enum ClientEvent {
SETTINGS_CLOSE = 'silex:settings:close',
SETTINGS_SAVE_START = 'silex:settings:save:start',
SETTINGS_SAVE_END = 'silex:settings:save:end',
SETTINGS_SECTION_CHANGE = 'silex:settings:section-change',
}
5 changes: 5 additions & 0 deletions src/ts/client/grapesjs/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ function displaySettings(editor, config, model = editor.getModel()) {
mainItem.classList.remove('silex-hidden')
// This messes up with the save / cancel mechanism
// displaySettings(editor, config, model)
// Refresh the code editor just in case it went from hidden to visible
// This makes it ready to be used when the user clicks on the tab
headEditor.refresh()
// Notify other plugins
editor.trigger(ClientEvent.SETTINGS_SECTION_CHANGE, item.id)
}}
>
${item.label}
Expand Down

0 comments on commit 02e2641

Please sign in to comment.