mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01: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:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user