MCPcopy Index your code
hub / github.com/codecombat/codecombat / closeCurrentView

Method closeCurrentView

app/core/Router.js:773–787  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

771 }
772
773 closeCurrentView () {
774 if (globalVar.currentView != null ? globalVar.currentView.reloadOnClose : undefined) {
775 return document.location.reload()
776 }
777 __guardMethod__(window.currentModal, 'hide', o => o.hide())
778 if (globalVar.currentView == null) { return }
779 globalVar.currentView.modalClosed()
780 globalVar.currentView.destroy()
781 $('.popover').popover('hide')
782 $('#flying-focus').css({ top: 0, left: 0 }) // otherwise it might make the page unnecessarily tall
783 return _.delay(function () {
784 $('html')[0].scrollTop = 0
785 $('body')[0].scrollTop = 0
786 }, 10)
787 }
788
789 initializeSocialMediaServices () {
790 if (application.testing || application.demoing || !me.useSocialSignOn()) { return }

Callers 1

openViewMethod · 0.95

Calls 4

reloadMethod · 0.80
__guardMethod__Function · 0.70
hideMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected