alvarotrigo / alvarotrigo/fullPage.js
Destroy should set back the menu or fixedElement to their initial DOM position
- 主要言語
- JavaScript
- スター
- 35.4k
- フォーク
- 7.1k
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
### Description
Hi,
I have multiple pages using fullPage.js on a Single Page Application, so when I leave a page I destroy the fullPage.js instance and I init a new fullPage.js instance on the new page. This works great... but:
The `menu` I specified into your plugin (it could have been a `fixedElements`) seems to be put outside the fullPage element by your plugin, and set just under the body in the DOM tree. My issue with that is when I delete the instance, this element remains. So after I navigate to another page, the menu will be recreated over and over... stacking them up.
It's a memory leak issue (guessing a user would switch pages the website for too long), but also, that's the older menu that is over all others, so since I change menu style depending on the current page, I won't see changes.
I hope I'm clear enough 😄 , maybe I'm doing something wrong?
Thank you,
@alvarotrigo
EDIT:
Note that I tried both `destroy()` and `destroy('all')`
コントリビューションガイド
評価
この issue はまだ評価されていません。