diff --git a/Signum.React/Scripts/Frames/FrameModal.tsx b/Signum.React/Scripts/Frames/FrameModal.tsx index 68a4f0583e..cc324108d7 100644 --- a/Signum.React/Scripts/Frames/FrameModal.tsx +++ b/Signum.React/Scripts/Frames/FrameModal.tsx @@ -277,7 +277,7 @@ export default class FrameModal extends React.Component {renderWidgets({ ctx: ctx, pack: pack })} - {this.entityComponent && } + {this.entityComponent && this.buttonBar = bb} frame={frame} pack={pack} isOperationVisible={this.props.isOperationVisible} />} this.validationErrors = ve} prefix={this.prefix} /> {embeddedWidgets.top}
diff --git a/Signum.React/Scripts/Frames/FramePage.tsx b/Signum.React/Scripts/Frames/FramePage.tsx index 83e7f29915..0eab05d6b0 100644 --- a/Signum.React/Scripts/Frames/FramePage.tsx +++ b/Signum.React/Scripts/Frames/FramePage.tsx @@ -67,8 +67,8 @@ export default class FramePage extends React.Component { - if (!e.defaultPrevented) - this.buttonBar && this.buttonBar.hanldleKeyDown(e); + if (!e.openedModals && this.buttonBar) + this.buttonBar.hanldleKeyDown(e); } load(props: FramePageProps) { diff --git a/Signum.React/Scripts/Modals.tsx b/Signum.React/Scripts/Modals.tsx index 3bf481fa48..d2716d865f 100644 --- a/Signum.React/Scripts/Modals.tsx +++ b/Signum.React/Scripts/Modals.tsx @@ -4,6 +4,12 @@ import * as React from 'react' import { FunctionalAdapter } from './Frames/FrameModal'; import { Modal } from 'react-overlays'; +declare global { + interface KeyboardEvent { + openedModals?: boolean; + } +} + export interface IModalProps { onExited?: (val: any) => void; } @@ -39,7 +45,7 @@ export class GlobalModalContainer extends React.Component<{}, GlobalModalContain hanldleKeyDown = (e: KeyboardEvent) => { if (modalInstances.length) { - e.preventDefault(); + e.openedModals = true; var topMost = modalInstances[modalInstances.length - 1]; if (topMost.handleKeyDown) {