Skip to content
This repository was archived by the owner on Aug 5, 2020. It is now read-only.

Commit d7d469a

Browse files
committed
Added section for known issues.
1 parent e4791e4 commit d7d469a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,23 @@ or replacing existing elements
310310
$bellows.bellows('add', items, true);
311311
```
312312

313+
## Known Issues and Workarounds
314+
315+
When the `singleItemOpen` configuration option is selected and the bellows items contain content that is larger than the overall viewport, closing an item can leave the user disoriented. This is due to the way `singleItemOpen` works; it closes all open items, then animates the selected one open. This can cause the positioning of the active item in the viewport to shift either up or down, resulting it it not being in the same position as when it was clicked.
316+
317+
To get around this, you can scroll to the item once the animation finishes. To do so, you just need to add the following to the `opened` event:
318+
319+
```
320+
$('.bellows').bellows({
321+
singleItemOpen: true,
322+
opened: function(e, ui) {
323+
Velocity.animate(ui.item, 'scroll');
324+
}
325+
});
326+
```
327+
328+
This will scroll the viewport to the opened bellows item, restoring its position in the viewport.
329+
313330
## Browser Compatibility
314331

315332
| Browser | Version | Support |

0 commit comments

Comments
 (0)