Skip to content
Snippets Groups Projects
Commit 53fa8286 authored by Mick Jordan's avatar Mick Jordan
Browse files

preserve visibility state across on.exit handlers

parent d38b4376
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,8 @@ public final class FunctionDefinitionNode extends RRootNode {
return ex.getResult();
} finally {
if (onExitProfile.profile(onExitSlot != null && onExitSlot.hasValue(vf))) {
// Must preserve the visibility state as it may be changed by the on.exit expression
boolean isVisible = RContext.isVisible();
ArrayList<Object> current = getCurrentOnExitList(vf, onExitSlot.executeFrameSlot(vf));
for (Object expr : current) {
if (!(expr instanceof RNode)) {
......@@ -103,6 +105,7 @@ public final class FunctionDefinitionNode extends RRootNode {
RNode node = (RNode) expr;
onExitExpressionCache.execute(vf, node);
}
RContext.setVisible(isVisible);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment