Skip to content

Commit 3e58aab

Browse files
authored
pointer-events override + {app} bug (#45)
* pointer-events: auto * {app}
1 parent a3dd4d9 commit 3e58aab

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

packages/account-sdk/src/ui/Dialog/Dialog.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
.-base-acc-sdk-css-reset {
33
-webkit-font-smoothing: antialiased;
4+
pointer-events: auto !important; // important to override the parent pointer-events: none;
45

56
.-base-acc-sdk-dialog-container {
67
position: fixed;

packages/account-sdk/src/util/web.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ vi.mock(':ui/Dialog/index.js', () => ({
2424

2525
const mockOrigin = 'http://localhost';
2626

27+
vi.mock(':store/store.js', () => ({
28+
store: {
29+
config: {
30+
get: vi.fn().mockReturnValue({ metadata: { appName: 'Test App' } }),
31+
},
32+
},
33+
}));
34+
2735
describe('PopupManager', () => {
2836
beforeAll(() => {
2937
global.window = Object.create(window);
@@ -87,7 +95,7 @@ describe('PopupManager', () => {
8795
await waitFor(() => {
8896
expect(mockPresentItem).toHaveBeenCalledWith(
8997
expect.objectContaining({
90-
title: expect.stringContaining('wants to continue in Base Account'),
98+
title: 'Test App wants to continue in Base Account',
9199
message: 'This action requires your permission to open a new window.',
92100
actionItems: expect.arrayContaining([
93101
expect.objectContaining({
@@ -117,7 +125,7 @@ describe('PopupManager', () => {
117125
await waitFor(() => {
118126
expect(mockPresentItem).toHaveBeenCalledWith(
119127
expect.objectContaining({
120-
title: expect.stringContaining('wants to continue in Base Account'),
128+
title: 'Test App wants to continue in Base Account',
121129
message: 'This action requires your permission to open a new window.',
122130
actionItems: expect.arrayContaining([
123131
expect.objectContaining({

packages/account-sdk/src/util/web.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ function openPopupWithDialog(tryOpenPopup: () => Window | null) {
7070
return new Promise<Window>((resolve, reject) => {
7171
logDialogShown({ dialogContext: 'popup_blocked' });
7272
dialog.presentItem({
73-
title: POPUP_BLOCKED_TITLE,
74-
message: POPUP_BLOCKED_MESSAGE.replace('{app}', dappName),
73+
title: POPUP_BLOCKED_TITLE.replace('{app}', dappName),
74+
message: POPUP_BLOCKED_MESSAGE,
7575
onClose: () => {
7676
logDialogActionClicked({
7777
dialogContext: 'popup_blocked',

0 commit comments

Comments
 (0)