mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-15 04:51:56 +00:00
Merge pull request #16409 from overleaf/dp-fix-group-pricing-after-back-button-pressed
Update group plan pricing modal after the page has fully loaded GitOrigin-RevId: 03e2ea642b38d6e2e208683b0cb68a817a5873c8
This commit is contained in:
parent
17d17612b3
commit
f6b7b84e88
1 changed files with 16 additions and 5 deletions
|
@ -136,14 +136,25 @@ document
|
|||
})
|
||||
})
|
||||
|
||||
const isGroupPlanModalAvailable = document.querySelector(
|
||||
'[data-ol-group-plan-modal]'
|
||||
)
|
||||
function updateGroupModalPlanPricingIfAvailable() {
|
||||
const isGroupPlanModalAvailable = document.querySelector(
|
||||
'[data-ol-group-plan-modal]'
|
||||
)
|
||||
|
||||
if (isGroupPlanModalAvailable) {
|
||||
updateGroupModalPlanPricing()
|
||||
if (isGroupPlanModalAvailable) {
|
||||
updateGroupModalPlanPricing()
|
||||
}
|
||||
}
|
||||
|
||||
updateGroupModalPlanPricingIfAvailable()
|
||||
|
||||
// When using browser back buttons, we need to update the pricing plan
|
||||
// after the page has fully loaded as we need to wait for the previously
|
||||
// selected values to load for e.g. size.
|
||||
window.addEventListener('load', () => {
|
||||
updateGroupModalPlanPricingIfAvailable()
|
||||
})
|
||||
|
||||
if (window.location.hash === '#groups') {
|
||||
showGroupPlanModal()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue