Skip to content

Commit a539ff2

Browse files
committed
For #5890: fix case where modal is not hidden when session is renewed from another tab
1 parent 04cc550 commit a539ff2

File tree

2 files changed

+4
-2
lines changed
  • form-runner/jvm/src/main/resources/apps/fr/components
  • xforms-web/src/main/scala/org/orbeon/xforms

2 files changed

+4
-2
lines changed

form-runner/jvm/src/main/resources/apps/fr/components/view.xsl

+3-1
Original file line numberDiff line numberDiff line change
@@ -1141,9 +1141,11 @@
11411141
value="xxf:property(string-join(('oxf.fr.detail.session-expiration-dialog.enabled', fr:app-name(), fr:form-name()), '.'))"/>
11421142

11431143
<!-- Session about to expire or expired dialog -->
1144+
<!-- Do not use `fade` class in this modal, as it will prevent the dialog from being hidden when the page/tab is not visible.
1145+
See: https://stackoverflow.com/questions/23677765/bootstrap-modal-hide-is-not-working -->
11441146
<xh:div
11451147
class="
1146-
fr-session-expiration-dialog modal hide fade
1148+
fr-session-expiration-dialog modal hide
11471149
fr-feature-{{ if ($session-expiration-dialog-enabled) then 'enabled' else 'disabled' }}"
11481150
tabindex="-1" role="dialog" aria-hidden="true">
11491151

xforms-web/src/main/scala/org/orbeon/xforms/Session.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ object Session {
7676
sessionMessage <- sessionMessageFromJson(event.data.asInstanceOf[String])
7777
configuration <- configurationOpt
7878
if sessionMessage.sessionId == configuration.sessionId
79-
} {
79+
} locally {
8080
sessionMessage match {
8181
case SessionActivity(_, localNewestEventTime) => sessionActivity(configuration, local = false, localNewestEventTime)
8282
case SessionLogout(_) => sessionLogout(configuration, local = false)

0 commit comments

Comments
 (0)