Bug or lack of documentation using data-name and stackPages

Very strange things are happening in our app related to navigation, especially back navigation with the iOS theme. Our app is using pre-loaded pages. We have 10 pages in the DOM and also in the router. All have data-name set.

We initialize the app as:

this.app = new Framework7({
    root: '#app',
    id: 'fqa.scoutingApp',
    name: 'Scouting',
    theme: 'auto',
    animateNavBackIcon: true,
    tapHold: false,
    tapHoldDelay: 750,
    panel: {
        swipe: 'left',
        swipeOnlyClose: true,
    actions: {
        convertToPopover: true,

And we initialize the view as:

this.mainView = this.app.views.create('.view-main', {
    name: 'main',
    main: true,
    routes: routes,
    stackPages: true,
    pushState: false,
    iosDynamicNavbar: false,
    iosSwipeBack: false,
    mdSwipeBack: false,

The routes are of the form:

   var routes = [
         { path: '/report-summary/, name: 'report-summary', pageName: 'report-summary' },
         { path: '/', name: 'select-field', pageName: 'select-field' }

On each of the route instances, for debugging I have a beforeEnter and beforeLeave function defined. I’m also logging all of the pageInit, pageBeforeIn, pageBeforeOut and pageBeforeRemove events.

Right after we initialize the mainView, all of the pre-loaded views get the CSS class ‘page-current’ applied. This seems inconsistent with the documentation for what page-current indicates.

All of pages fire the pageInit event. This is fine and seems to be okay since the reInit event is fired before a page is to be displayed.

When navigating from the first page to the next page, all of the expected events run. The previous page correctly has the CSS class ‘page-previous’, but all of the pages that had ‘page-current’ still have page current on them.

Now here is the trouble, when the user hits the back button, crazy stuff happens. The expected events are fired, but what is unexpected is that the page that is supposed to be current is duplicated in the DOM 3 extra times and the pageBeforeOut is fired for all of the pages that had page-current applied.

I finally noticed that after I navigate, the ‘stacked’ class was being added by the router to all of the pages as well. I decided to preemptively add the CSS class ‘stacked’ on every page that is pre-loaded and all of my problems disappeared.

Is this a bug or a documentation problem?