Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

metronic navbar is sometimes created twice when the screen size changes why?


Metronic navbar is sometimes created twice when the screen size changes why?


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (6)


Hi,

Thank you for reaching out to us.

Unfortunately, after checking this further we were not able to reproduce this issue in the latest Metronic version.

Could you please specify which Metronic version are you using?

Do you have this issue on our preview page?
https://preview.keenthemes.com/metronic8/vue/demo1/#/dashboard

Regards,
Lauris Stepanovs,
Keenthemes Support Team



By the way, I found the problem, the same thing happens in your preview page. After logging out, when you log in again, when you enlarge and minimize the page, the menu is created again. I took a screenshot
By the way, when I comment SwapperComponent.reinitialisation(); in the following function in keenthemes.js file, the error disappears. But I don't know this exact solution?

const reinitializeComponents = () => {
ThemeModeComponent.init();
setTimeout(() => {
ToggleComponent.reinitialization();
StickyComponent.reInitialization();
MenuComponent.reinitialization();
reinitializeScrollComponent().then(() => {
ScrollComponent.updateAll();
});
DrawerComponent.reinitialization();
// SwapperComponent.reinitialization();
}, 0);
};



Hello Laurisi,

First of all, thank you for the return.

The theme I use is vue_demo1, version 8.1.8

I couldn't reproduce this problem on your preview page.

But I took a screenshot. It usually occurs when I resize the screen on pages where I do heavy operations.

I wonder where I should check this



By the way, I found the problem, the same thing happens in your preview page. After logging out, when you log in again, when you enlarge and minimize the page, the menu is created again. I took a screenshot



By the way, when I comment SwapperComponent.reinitialisation(); in the following function in keenthemes.js file, the error disappears. But I don't know this exact solution?

const reinitializeComponents = () => {
ThemeModeComponent.init();
setTimeout(() => {
ToggleComponent.reinitialization();
StickyComponent.reInitialization();
MenuComponent.reinitialization();
reinitializeScrollComponent().then(() => {
ScrollComponent.updateAll();
});
DrawerComponent.reinitialization();
// SwapperComponent.reinitialization();
}, 0);
};



Hi Ceyhun,

Thank you for letting us know about this issue.

We reproduced this problem, it is related to our SwapperComponent.

We will check this problem in more detail and include a fix in the next releases. For now, as a temporary solution, you can remove SwapperComponent reinitialization, after removing reinitializtion please make sure that menu on mobile version works correctly.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(