Skip to content

Fix modal ActionBar when the modal is launched for a different frame within a component #558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion platform/nativescript/plugins/modal-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default {
const modalPage = navEntryInstance.$mount().$el.nativeView
updateDevtools()

this.$el.nativeView.showModal(modalPage, options)
this.$root.nativeView.showModal(modalPage, options)
})
}
}
Expand Down
49 changes: 0 additions & 49 deletions samples/app/536.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,52 +83,3 @@ new Vue({
</GridLayout>
`
}).$start()

// Working code. Please comment the previous Vue instance and
// uncomment the following commented code in order to workaround the issue
// The workaround is opening the modal in the root component
/*
const TabContentWorking = {
template: `
<GridLayout rows="auto, auto">
<Label text="This is the home page." row="0" />
<Button text="Open Wizard" row="1" @tap="emitOpenEvent" />
</GridLayout>
`,
methods: {
emitOpenEvent() {
this.$emit('show')
}
}
}

new Vue({
components: {
TabContentWorking
},
template: `
<GridLayout rows="*">
<TabView androidTabsPosition="bottom" iosIconRenderingMode="alwaysOriginal">
<TabViewItem title="Tab1" textTransform="capitalize">
<Frame id="main-frame">
<Page class="page">
<ActionBar title="#536" />
<TabContentWorking @show="openModal" />
</Page>
</Frame>
</TabViewItem>
</TabView>
</GridLayout>
`,
methods: {
openModal () {
// show the wizard in a modal, and make sure it is fullscreen.
this.$showModal(WizardModal, {
fullscreen: true
}).then(res => {
console.log('wizard completed with res', res)
})
}
}
}).$start()
*/