Browse Source

Fix #1600 Sidebar not immediately available after init when wrong html

pull/1615/head
jlukic 10 years ago
parent
commit
086307e563
2 changed files with 5 additions and 1 deletions
  1. 1
      RELEASE-NOTES.md
  2. 5
      src/definitions/modules/sidebar.js

1
RELEASE-NOTES.md

@ -13,6 +13,7 @@
**Code / Build**
- **Build** - `Dist/` files now set file permissions in build. `644` by default. Can adjust in `semantic.json` or during gulp install. You will need to run `npm install` to add the new gulp-chmod dependency *Thanks @PeterDaveHello*
- **Sidebar** - `setup layout` not occurs synchronously if you initialize a sidebar without the proper html. This makes sure calls to sidebar will occur correctly before the page is setup. A new setting `delaySetup` will override this, increasing performance.
- **Modules** - Remove use of deprecated `.size()` for `.length` across all modules
- **Modules** - Use of `$.proxy` swapped to native `function.call()` for performance gains across all modules

5
src/definitions/modules/sidebar.js

@ -93,7 +93,9 @@ $.fn.sidebar = function(parameters) {
}
// avoids locking rendering if initialized in onReady
requestAnimationFrame(module.setup.layout);
if(settings.delaySetup) {
requestAnimationFrame(module.setup.layout);
}
module.instantiate();
},
@ -1007,6 +1009,7 @@ $.fn.sidebar.settings = {
dimPage : true,
scrollLock : false,
returnScroll : false,
delaySetup : false,
useLegacy : 'auto',
duration : 500,

Loading…
Cancel
Save