Can I make calendar, smart select don't pushstate?


I am using calendar, smart select inside a view with pushstate: true.

The url will become #!/myView/calendar/ from #!/myView/ when the calendar is opened.

The calendar closes when browser “history.back”.
However, if user “history.forward” now, my page will turn to 404 not found.

I am thinking if this behaviour comes from the same problem like what I posted - Detail Routes’s pushstate link won’t work if master route has params?

I want my view has pushstate but not the popups (calendar, etc). Is there a way to disable the calendar’s pushstate?
I have tried some approaches but don’t work, such as

  • in app init options - calendar:{ pushState: false}
  • in calendar.create option


They have parameter routableModals which is enabled by default, disable it and they don’t push state

1 Like

Yes, this disables pushState.

But, now the pushState is important because the modal is kept on the screen when “history.back” to the previous view.

I am using this workaround to auto-close the modals when user navigates away,

window.addEventListener('popstate', function() {
		.forEach( (name)=>{
			try {
			} catch (e) {}

In my case, i’v solve it adding this to the selects, popups…
data-close-on-select=“true” data-routable-modals=“false”

the data-routable-modals=“false” do the trick…

hope it helps and sorry for my english