Skip to content

Commit c221fca

Browse files
committed
Merge remote-tracking branch 'benma/escape'
2 parents 4f01273 + 14fdd7a commit c221fca

File tree

4 files changed

+3
-8
lines changed

4 files changed

+3
-8
lines changed

frontends/web/src/components/dialog/dialog.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ type TProps = {
2828
large?: boolean;
2929
slim?: boolean;
3030
centered?: boolean;
31-
disableEscape?: boolean;
3231
onClose?: (e?: Event) => void;
3332
children: React.ReactNode;
3433
open: boolean;
@@ -41,7 +40,6 @@ export const Dialog = ({
4140
large,
4241
slim,
4342
centered,
44-
disableEscape,
4543
onClose,
4644
children,
4745
open,
@@ -169,10 +167,10 @@ export const Dialog = ({
169167
if (!renderDialog) {
170168
return;
171169
}
172-
if (!disableEscape) {
170+
if (onClose !== undefined) {
173171
deactivate(true);
174172
}
175-
}, [renderDialog, disableEscape, deactivate]));
173+
}, [renderDialog, onClose, deactivate]));
176174

177175
useEffect(() => {
178176
if (open) {

frontends/web/src/routes/account/receive/receive-bb01.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ export const Receive = ({
253253
<Dialog
254254
open={((!!account) && forceVerification && verifying)}
255255
title={verifyLabel}
256-
disableEscape={true}
257256
medium centered>
258257
<div className="text-center">
259258
{account && <>

frontends/web/src/routes/account/receive/receive.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,8 @@ export const Receive = ({
292292
<Dialog
293293
open={!!(account && verifying)}
294294
title={t('receive.verifyBitBox02')}
295-
// disable escape for secure outputs like the BitBox02, where the dialog is
295+
// disable exit/escape for secure outputs like the BitBox02, where the dialog is
296296
// dimissed by tapping the device
297-
disableEscape={verifying === 'secure'}
298297
onClose={verifying === 'insecure' ? () => {
299298
setVerifying(false);
300299
} : undefined}

frontends/web/src/routes/buy/pocket.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ export const Pocket = ({ code }: TProps) => {
245245
<Dialog
246246
open={verifying}
247247
title={t('receive.verifyBitBox02')}
248-
disableEscape={true}
249248
medium centered>
250249
<div className="text-center">{t('buy.pocket.verifyBitBox02')}</div>
251250
</Dialog>

0 commit comments

Comments
 (0)