From 5f951208e48d63b85f3d762b254fce7b1f09dd10 Mon Sep 17 00:00:00 2001 From: Emanuele Feliziani Date: Tue, 3 Oct 2023 09:44:00 +0200 Subject: [PATCH 1/3] Fix self-closing modals regression Signed-off-by: Emanuele Feliziani --- integration-test/helpers/mocks.js | 1 + integration-test/helpers/pages.js | 6 +-- integration-test/pages/login-in-modal.html | 4 +- integration-test/pages/signup-in-modal.html | 53 +++++++++++++++++++ .../tests/email-autofill.extension.spec.js | 30 ++++++++++- src/UI/controllers/HTMLTooltipUIController.js | 31 ++++++----- 6 files changed, 107 insertions(+), 18 deletions(-) create mode 100644 integration-test/pages/signup-in-modal.html diff --git a/integration-test/helpers/mocks.js b/integration-test/helpers/mocks.js index c8b035c26..89201092a 100644 --- a/integration-test/helpers/mocks.js +++ b/integration-test/helpers/mocks.js @@ -16,6 +16,7 @@ export const constants = { 'loginWithPoorForm': 'pages/login-poor-form.html', 'loginWithText': 'pages/login-with-text.html', 'loginWithFormInModal': 'pages/login-in-modal.html', + 'signupWithFormInModal': 'pages/signup-in-modal.html', 'loginCovered': 'pages/login-covered.html', 'loginMultistep': 'pages/login-multistep.html' }, diff --git a/integration-test/helpers/pages.js b/integration-test/helpers/pages.js index 4d75ebbcb..760eae3ce 100644 --- a/integration-test/helpers/pages.js +++ b/integration-test/helpers/pages.js @@ -579,16 +579,16 @@ export function loginPage (page, opts = {}) { expect(mockCalls).toHaveLength(0) } async openDialog () { - const button = await page.waitForSelector(`button:has-text("Click here to Login")`) + const button = await page.waitForSelector(`button:has-text("Click here to open dialog")`) await button.click({ force: true }) await this.assertDialogOpen() } async assertDialogClose () { - const form = await page.locator('#login') + const form = await page.locator('.dialog') await expect(form).toBeHidden() } async assertDialogOpen () { - const form = await page.locator('#login') + const form = await page.locator('.dialog') await expect(form).toBeVisible() } async hitEscapeKey () { diff --git a/integration-test/pages/login-in-modal.html b/integration-test/pages/login-in-modal.html index 81dff3046..bc45a7539 100644 --- a/integration-test/pages/login-in-modal.html +++ b/integration-test/pages/login-in-modal.html @@ -11,7 +11,7 @@

[Home]

-

+

Some random text to use as "something outside the dialog element". Clicking here should close the dialog (if open).

@@ -37,7 +37,7 @@

Log in

}, {once: true}) window.addEventListener('pointerdown', (e) => { if (!dialogEl.contains(e.target)) {dialogEl.setAttribute('hidden', '')} - }, {once: true}) + }) }) const form = document.forms.login; diff --git a/integration-test/pages/signup-in-modal.html b/integration-test/pages/signup-in-modal.html new file mode 100644 index 000000000..70dbd43a8 --- /dev/null +++ b/integration-test/pages/signup-in-modal.html @@ -0,0 +1,53 @@ + + + + + + + Signup form within a modal + + + + +

[Home]

+ +

+ +

Some random text to use as "something outside the dialog element". Clicking here should close the dialog (if open).

+ + + + + + diff --git a/integration-test/tests/email-autofill.extension.spec.js b/integration-test/tests/email-autofill.extension.spec.js index b3037df60..b1a2f6003 100644 --- a/integration-test/tests/email-autofill.extension.spec.js +++ b/integration-test/tests/email-autofill.extension.spec.js @@ -1,7 +1,7 @@ import {forwardConsoleMessages, withEmailProtectionExtensionSignedInAs} from '../helpers/harness.js' import { test as base, expect } from '@playwright/test' import {constants} from '../helpers/mocks.js' -import {emailAutofillPage} from '../helpers/pages.js' +import {emailAutofillPage, loginPage} from '../helpers/pages.js' import { stripDuckExtension } from '../helpers/utils.js' import {testContext} from '../helpers/test-context.js' @@ -66,4 +66,32 @@ test.describe('chrome extension', () => { 'autofill_show', 'autofill_private_address' // second private autofill ]) }) + + test('should not close the modal when autofilling', async ({page}) => { + const {personalAddress} = constants.fields.email + + forwardConsoleMessages(page) + await withEmailProtectionExtensionSignedInAs(page, stripDuckExtension(personalAddress)) + // page abstraction + const emailPage = loginPage(page) + await emailPage.navigate('signupWithFormInModal') + + await emailPage.openDialog() + + await emailPage.clickIntoUsernameInput() + + // buttons, unique to the extension + const personalAddressBtn = await page.locator(`text=Use ${personalAddress} Block email trackers`) + + // click first option + await personalAddressBtn.click() + + // ensure autofill populates the field + await emailPage.assertUsernameFilled(personalAddress) + + await emailPage.assertDialogOpen() + + await emailPage.clickOutsideTheDialog() + await emailPage.assertDialogClose() + }) }) diff --git a/src/UI/controllers/HTMLTooltipUIController.js b/src/UI/controllers/HTMLTooltipUIController.js index b0d1d2bc9..fb6375b90 100644 --- a/src/UI/controllers/HTMLTooltipUIController.js +++ b/src/UI/controllers/HTMLTooltipUIController.js @@ -44,8 +44,13 @@ export class HTMLTooltipUIController extends UIController { super() this._options = options this._htmlTooltipOptions = Object.assign({}, defaultOptions, htmlTooltipOptions) - window.addEventListener('pointerdown', this, true) - window.addEventListener('pointerup', this, true) + // Use pointerup to mimic click behaviour when we're in the top-frame webview + if (options.device.globalConfig.isTopFrame) { + window.addEventListener('pointerup', this, true) + } else { + // Pointerdown is needed here to avoid self-closing modals disappearing because this even happens in the page + window.addEventListener('pointerdown', this, true) + } } _activeInput @@ -214,9 +219,7 @@ export class HTMLTooltipUIController extends UIController { // @ts-ignore if (e.target.nodeName === 'DDG-AUTOFILL') { - e.preventDefault() - e.stopImmediatePropagation() - // Ignore pointer down events, we'll handle them on pointer up + this._handleClickInTooltip(e) } else { this.removeTooltip().catch(e => { console.error('error removing tooltip', e) @@ -232,15 +235,19 @@ export class HTMLTooltipUIController extends UIController { // @ts-ignore if (e.target.nodeName === 'DDG-AUTOFILL') { - e.preventDefault() - e.stopImmediatePropagation() + this._handleClickInTooltip(e) + } + } - const isMainMouseButton = e.button === 0 - if (!isMainMouseButton) return + _handleClickInTooltip (e) { + e.preventDefault() + e.stopImmediatePropagation() - const activeTooltip = this.getActiveTooltip() - activeTooltip?.dispatchClick() - } + const isMainMouseButton = e.button === 0 + if (!isMainMouseButton) return + + const activeTooltip = this.getActiveTooltip() + activeTooltip?.dispatchClick() } async removeTooltip (_via) { From 738e918f008457f03307e8b87ce62574ff4e2bea Mon Sep 17 00:00:00 2001 From: Emanuele Feliziani Date: Tue, 3 Oct 2023 09:44:39 +0200 Subject: [PATCH 2/3] Fix hotel check-ins dates false matches as cc exp Signed-off-by: Emanuele Feliziani --- dist/autofill-debug.js | 34 ++- dist/autofill.js | 34 ++- .../__generated__/compiled-matching-config.js | 6 +- .../matching-config/matching-config-source.js | 6 +- src/Form/test-cases/accor_hotel-booking.html | 241 ++++++++++++++++++ src/Form/test-cases/index.json | 1 + .../Resources/assets/autofill-debug.js | 34 ++- swift-package/Resources/assets/autofill.js | 34 ++- 8 files changed, 328 insertions(+), 62 deletions(-) create mode 100644 src/Form/test-cases/accor_hotel-booking.html diff --git a/dist/autofill-debug.js b/dist/autofill-debug.js index 22590f9a5..27b6613f1 100644 --- a/dist/autofill-debug.js +++ b/dist/autofill-debug.js @@ -12096,15 +12096,15 @@ const matchingConfiguration = exports.matchingConfiguration = { }, expirationMonth: { match: /(card|\bcc\b)?.?(exp(iry|iration)?)?.?(month|\bmm\b(?![.\s/-]yy))/iu, - skip: /mm[/\s.\-_—–]/iu + skip: /mm[/\s.\-_—–]|check/iu }, expirationYear: { match: /(card|\bcc\b)?.?(exp(iry|iration)?)?.?(year|yy)/iu, - skip: /mm[/\s.\-_—–]/iu + skip: /mm[/\s.\-_—–]|check/iu }, expiration: { match: /(\bmm\b|\b\d\d\b)[/\s.\-_—–](\byy|\bjj|\baa|\b\d\d)|\bexp|\bvalid(idity| through| until)/iu, - skip: /invalid|^dd\//iu + skip: /invalid|^dd\/|check/iu }, firstName: { match: /(first|given|fore).?name|\bnome/iu, @@ -15048,8 +15048,13 @@ class HTMLTooltipUIController extends _UIController.UIController { super(); this._options = options; this._htmlTooltipOptions = Object.assign({}, _HTMLTooltip.defaultOptions, htmlTooltipOptions); - window.addEventListener('pointerdown', this, true); - window.addEventListener('pointerup', this, true); + // Use pointerup to mimic click behaviour when we're in the top-frame webview + if (options.device.globalConfig.isTopFrame) { + window.addEventListener('pointerup', this, true); + } else { + // Pointerdown is needed here to avoid self-closing modals disappearing because this even happens in the page + window.addEventListener('pointerdown', this, true); + } } _activeInput; _activeInputOriginalAutocomplete; @@ -15214,9 +15219,7 @@ class HTMLTooltipUIController extends _UIController.UIController { // @ts-ignore if (e.target.nodeName === 'DDG-AUTOFILL') { - e.preventDefault(); - e.stopImmediatePropagation(); - // Ignore pointer down events, we'll handle them on pointer up + this._handleClickInTooltip(e); } else { this.removeTooltip().catch(e => { console.error('error removing tooltip', e); @@ -15232,14 +15235,17 @@ class HTMLTooltipUIController extends _UIController.UIController { // @ts-ignore if (e.target.nodeName === 'DDG-AUTOFILL') { - e.preventDefault(); - e.stopImmediatePropagation(); - const isMainMouseButton = e.button === 0; - if (!isMainMouseButton) return; - const activeTooltip = this.getActiveTooltip(); - activeTooltip?.dispatchClick(); + this._handleClickInTooltip(e); } } + _handleClickInTooltip(e) { + e.preventDefault(); + e.stopImmediatePropagation(); + const isMainMouseButton = e.button === 0; + if (!isMainMouseButton) return; + const activeTooltip = this.getActiveTooltip(); + activeTooltip?.dispatchClick(); + } async removeTooltip(_via) { this._htmlTooltipOptions.remove(); if (this._activeTooltip) { diff --git a/dist/autofill.js b/dist/autofill.js index bd228ac95..dc930d41b 100644 --- a/dist/autofill.js +++ b/dist/autofill.js @@ -8151,15 +8151,15 @@ const matchingConfiguration = exports.matchingConfiguration = { }, expirationMonth: { match: /(card|\bcc\b)?.?(exp(iry|iration)?)?.?(month|\bmm\b(?![.\s/-]yy))/iu, - skip: /mm[/\s.\-_—–]/iu + skip: /mm[/\s.\-_—–]|check/iu }, expirationYear: { match: /(card|\bcc\b)?.?(exp(iry|iration)?)?.?(year|yy)/iu, - skip: /mm[/\s.\-_—–]/iu + skip: /mm[/\s.\-_—–]|check/iu }, expiration: { match: /(\bmm\b|\b\d\d\b)[/\s.\-_—–](\byy|\bjj|\baa|\b\d\d)|\bexp|\bvalid(idity| through| until)/iu, - skip: /invalid|^dd\//iu + skip: /invalid|^dd\/|check/iu }, firstName: { match: /(first|given|fore).?name|\bnome/iu, @@ -11103,8 +11103,13 @@ class HTMLTooltipUIController extends _UIController.UIController { super(); this._options = options; this._htmlTooltipOptions = Object.assign({}, _HTMLTooltip.defaultOptions, htmlTooltipOptions); - window.addEventListener('pointerdown', this, true); - window.addEventListener('pointerup', this, true); + // Use pointerup to mimic click behaviour when we're in the top-frame webview + if (options.device.globalConfig.isTopFrame) { + window.addEventListener('pointerup', this, true); + } else { + // Pointerdown is needed here to avoid self-closing modals disappearing because this even happens in the page + window.addEventListener('pointerdown', this, true); + } } _activeInput; _activeInputOriginalAutocomplete; @@ -11269,9 +11274,7 @@ class HTMLTooltipUIController extends _UIController.UIController { // @ts-ignore if (e.target.nodeName === 'DDG-AUTOFILL') { - e.preventDefault(); - e.stopImmediatePropagation(); - // Ignore pointer down events, we'll handle them on pointer up + this._handleClickInTooltip(e); } else { this.removeTooltip().catch(e => { console.error('error removing tooltip', e); @@ -11287,14 +11290,17 @@ class HTMLTooltipUIController extends _UIController.UIController { // @ts-ignore if (e.target.nodeName === 'DDG-AUTOFILL') { - e.preventDefault(); - e.stopImmediatePropagation(); - const isMainMouseButton = e.button === 0; - if (!isMainMouseButton) return; - const activeTooltip = this.getActiveTooltip(); - activeTooltip?.dispatchClick(); + this._handleClickInTooltip(e); } } + _handleClickInTooltip(e) { + e.preventDefault(); + e.stopImmediatePropagation(); + const isMainMouseButton = e.button === 0; + if (!isMainMouseButton) return; + const activeTooltip = this.getActiveTooltip(); + activeTooltip?.dispatchClick(); + } async removeTooltip(_via) { this._htmlTooltipOptions.remove(); if (this._activeTooltip) { diff --git a/src/Form/matching-config/__generated__/compiled-matching-config.js b/src/Form/matching-config/__generated__/compiled-matching-config.js index aeb4a8ac1..363cf4522 100644 --- a/src/Form/matching-config/__generated__/compiled-matching-config.js +++ b/src/Form/matching-config/__generated__/compiled-matching-config.js @@ -266,15 +266,15 @@ const matchingConfiguration = { }, expirationMonth: { match: /(card|\bcc\b)?.?(exp(iry|iration)?)?.?(month|\bmm\b(?![.\s/-]yy))/iu, - skip: /mm[/\s.\-_—–]/iu + skip: /mm[/\s.\-_—–]|check/iu }, expirationYear: { match: /(card|\bcc\b)?.?(exp(iry|iration)?)?.?(year|yy)/iu, - skip: /mm[/\s.\-_—–]/iu + skip: /mm[/\s.\-_—–]|check/iu }, expiration: { match: /(\bmm\b|\b\d\d\b)[/\s.\-_—–](\byy|\bjj|\baa|\b\d\d)|\bexp|\bvalid(idity| through| until)/iu, - skip: /invalid|^dd\//iu + skip: /invalid|^dd\/|check/iu }, firstName: { match: /(first|given|fore).?name|\bnome/iu, diff --git a/src/Form/matching-config/matching-config-source.js b/src/Form/matching-config/matching-config-source.js index 9b83816a7..006ab34ab 100644 --- a/src/Form/matching-config/matching-config-source.js +++ b/src/Form/matching-config/matching-config-source.js @@ -293,12 +293,12 @@ const matchingConfiguration = { cardSecurityCode: {match: 'security.?code|card.?verif|cvv|csc|cvc|cv2|card id'}, expirationMonth: { match: '(card|\\bcc\\b)?.?(exp(iry|iration)?)?.?(month|\\bmm\\b(?![.\\s/-]yy))', - skip: 'mm[/\\s.\\-_—–]' + skip: 'mm[/\\s.\\-_—–]|check' }, - expirationYear: {match: '(card|\\bcc\\b)?.?(exp(iry|iration)?)?.?(year|yy)', skip: 'mm[/\\s.\\-_—–]'}, + expirationYear: {match: '(card|\\bcc\\b)?.?(exp(iry|iration)?)?.?(year|yy)', skip: 'mm[/\\s.\\-_—–]|check'}, expiration: { match: '(\\bmm\\b|\\b\\d\\d\\b)[/\\s.\\-_—–](\\byy|\\bjj|\\baa|\\b\\d\\d)|\\bexp|\\bvalid(idity| through| until)', - skip: 'invalid|^dd/' + skip: 'invalid|^dd/|check' }, // Identities diff --git a/src/Form/test-cases/accor_hotel-booking.html b/src/Form/test-cases/accor_hotel-booking.html new file mode 100644 index 000000000..953ffc682 --- /dev/null +++ b/src/Form/test-cases/accor_hotel-booking.html @@ -0,0 +1,241 @@ + +
+
+
+
+ + +
+
+ + + + +
+ +
+
+ + +
+
+
+ + +
+ + + +
+
+
+
+
diff --git a/src/Form/test-cases/index.json b/src/Form/test-cases/index.json index 6f6aed098..7517bfbd0 100644 --- a/src/Form/test-cases/index.json +++ b/src/Form/test-cases/index.json @@ -502,5 +502,6 @@ { "html": "morningstar_login.html" }, { "html": "alrincon_login.html" }, { "html": "metalarchives_login.html" }, + { "html": "accor_hotel-booking.html" }, { "html": "flytap_login.html" } ] diff --git a/swift-package/Resources/assets/autofill-debug.js b/swift-package/Resources/assets/autofill-debug.js index 22590f9a5..27b6613f1 100644 --- a/swift-package/Resources/assets/autofill-debug.js +++ b/swift-package/Resources/assets/autofill-debug.js @@ -12096,15 +12096,15 @@ const matchingConfiguration = exports.matchingConfiguration = { }, expirationMonth: { match: /(card|\bcc\b)?.?(exp(iry|iration)?)?.?(month|\bmm\b(?![.\s/-]yy))/iu, - skip: /mm[/\s.\-_—–]/iu + skip: /mm[/\s.\-_—–]|check/iu }, expirationYear: { match: /(card|\bcc\b)?.?(exp(iry|iration)?)?.?(year|yy)/iu, - skip: /mm[/\s.\-_—–]/iu + skip: /mm[/\s.\-_—–]|check/iu }, expiration: { match: /(\bmm\b|\b\d\d\b)[/\s.\-_—–](\byy|\bjj|\baa|\b\d\d)|\bexp|\bvalid(idity| through| until)/iu, - skip: /invalid|^dd\//iu + skip: /invalid|^dd\/|check/iu }, firstName: { match: /(first|given|fore).?name|\bnome/iu, @@ -15048,8 +15048,13 @@ class HTMLTooltipUIController extends _UIController.UIController { super(); this._options = options; this._htmlTooltipOptions = Object.assign({}, _HTMLTooltip.defaultOptions, htmlTooltipOptions); - window.addEventListener('pointerdown', this, true); - window.addEventListener('pointerup', this, true); + // Use pointerup to mimic click behaviour when we're in the top-frame webview + if (options.device.globalConfig.isTopFrame) { + window.addEventListener('pointerup', this, true); + } else { + // Pointerdown is needed here to avoid self-closing modals disappearing because this even happens in the page + window.addEventListener('pointerdown', this, true); + } } _activeInput; _activeInputOriginalAutocomplete; @@ -15214,9 +15219,7 @@ class HTMLTooltipUIController extends _UIController.UIController { // @ts-ignore if (e.target.nodeName === 'DDG-AUTOFILL') { - e.preventDefault(); - e.stopImmediatePropagation(); - // Ignore pointer down events, we'll handle them on pointer up + this._handleClickInTooltip(e); } else { this.removeTooltip().catch(e => { console.error('error removing tooltip', e); @@ -15232,14 +15235,17 @@ class HTMLTooltipUIController extends _UIController.UIController { // @ts-ignore if (e.target.nodeName === 'DDG-AUTOFILL') { - e.preventDefault(); - e.stopImmediatePropagation(); - const isMainMouseButton = e.button === 0; - if (!isMainMouseButton) return; - const activeTooltip = this.getActiveTooltip(); - activeTooltip?.dispatchClick(); + this._handleClickInTooltip(e); } } + _handleClickInTooltip(e) { + e.preventDefault(); + e.stopImmediatePropagation(); + const isMainMouseButton = e.button === 0; + if (!isMainMouseButton) return; + const activeTooltip = this.getActiveTooltip(); + activeTooltip?.dispatchClick(); + } async removeTooltip(_via) { this._htmlTooltipOptions.remove(); if (this._activeTooltip) { diff --git a/swift-package/Resources/assets/autofill.js b/swift-package/Resources/assets/autofill.js index bd228ac95..dc930d41b 100644 --- a/swift-package/Resources/assets/autofill.js +++ b/swift-package/Resources/assets/autofill.js @@ -8151,15 +8151,15 @@ const matchingConfiguration = exports.matchingConfiguration = { }, expirationMonth: { match: /(card|\bcc\b)?.?(exp(iry|iration)?)?.?(month|\bmm\b(?![.\s/-]yy))/iu, - skip: /mm[/\s.\-_—–]/iu + skip: /mm[/\s.\-_—–]|check/iu }, expirationYear: { match: /(card|\bcc\b)?.?(exp(iry|iration)?)?.?(year|yy)/iu, - skip: /mm[/\s.\-_—–]/iu + skip: /mm[/\s.\-_—–]|check/iu }, expiration: { match: /(\bmm\b|\b\d\d\b)[/\s.\-_—–](\byy|\bjj|\baa|\b\d\d)|\bexp|\bvalid(idity| through| until)/iu, - skip: /invalid|^dd\//iu + skip: /invalid|^dd\/|check/iu }, firstName: { match: /(first|given|fore).?name|\bnome/iu, @@ -11103,8 +11103,13 @@ class HTMLTooltipUIController extends _UIController.UIController { super(); this._options = options; this._htmlTooltipOptions = Object.assign({}, _HTMLTooltip.defaultOptions, htmlTooltipOptions); - window.addEventListener('pointerdown', this, true); - window.addEventListener('pointerup', this, true); + // Use pointerup to mimic click behaviour when we're in the top-frame webview + if (options.device.globalConfig.isTopFrame) { + window.addEventListener('pointerup', this, true); + } else { + // Pointerdown is needed here to avoid self-closing modals disappearing because this even happens in the page + window.addEventListener('pointerdown', this, true); + } } _activeInput; _activeInputOriginalAutocomplete; @@ -11269,9 +11274,7 @@ class HTMLTooltipUIController extends _UIController.UIController { // @ts-ignore if (e.target.nodeName === 'DDG-AUTOFILL') { - e.preventDefault(); - e.stopImmediatePropagation(); - // Ignore pointer down events, we'll handle them on pointer up + this._handleClickInTooltip(e); } else { this.removeTooltip().catch(e => { console.error('error removing tooltip', e); @@ -11287,14 +11290,17 @@ class HTMLTooltipUIController extends _UIController.UIController { // @ts-ignore if (e.target.nodeName === 'DDG-AUTOFILL') { - e.preventDefault(); - e.stopImmediatePropagation(); - const isMainMouseButton = e.button === 0; - if (!isMainMouseButton) return; - const activeTooltip = this.getActiveTooltip(); - activeTooltip?.dispatchClick(); + this._handleClickInTooltip(e); } } + _handleClickInTooltip(e) { + e.preventDefault(); + e.stopImmediatePropagation(); + const isMainMouseButton = e.button === 0; + if (!isMainMouseButton) return; + const activeTooltip = this.getActiveTooltip(); + activeTooltip?.dispatchClick(); + } async removeTooltip(_via) { this._htmlTooltipOptions.remove(); if (this._activeTooltip) { From e6becc34618a1a1feda981109574365f31563340 Mon Sep 17 00:00:00 2001 From: Emanuele Feliziani Date: Tue, 3 Oct 2023 09:59:32 +0200 Subject: [PATCH 3/3] Improve comment Signed-off-by: Emanuele Feliziani --- dist/autofill-debug.js | 2 +- dist/autofill.js | 2 +- src/UI/controllers/HTMLTooltipUIController.js | 2 +- swift-package/Resources/assets/autofill-debug.js | 2 +- swift-package/Resources/assets/autofill.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/autofill-debug.js b/dist/autofill-debug.js index 27b6613f1..21a055277 100644 --- a/dist/autofill-debug.js +++ b/dist/autofill-debug.js @@ -15048,7 +15048,7 @@ class HTMLTooltipUIController extends _UIController.UIController { super(); this._options = options; this._htmlTooltipOptions = Object.assign({}, _HTMLTooltip.defaultOptions, htmlTooltipOptions); - // Use pointerup to mimic click behaviour when we're in the top-frame webview + // Use pointerup to mimic native click behaviour when we're in the top-frame webview if (options.device.globalConfig.isTopFrame) { window.addEventListener('pointerup', this, true); } else { diff --git a/dist/autofill.js b/dist/autofill.js index dc930d41b..6bc8e4009 100644 --- a/dist/autofill.js +++ b/dist/autofill.js @@ -11103,7 +11103,7 @@ class HTMLTooltipUIController extends _UIController.UIController { super(); this._options = options; this._htmlTooltipOptions = Object.assign({}, _HTMLTooltip.defaultOptions, htmlTooltipOptions); - // Use pointerup to mimic click behaviour when we're in the top-frame webview + // Use pointerup to mimic native click behaviour when we're in the top-frame webview if (options.device.globalConfig.isTopFrame) { window.addEventListener('pointerup', this, true); } else { diff --git a/src/UI/controllers/HTMLTooltipUIController.js b/src/UI/controllers/HTMLTooltipUIController.js index fb6375b90..0d2a56f64 100644 --- a/src/UI/controllers/HTMLTooltipUIController.js +++ b/src/UI/controllers/HTMLTooltipUIController.js @@ -44,7 +44,7 @@ export class HTMLTooltipUIController extends UIController { super() this._options = options this._htmlTooltipOptions = Object.assign({}, defaultOptions, htmlTooltipOptions) - // Use pointerup to mimic click behaviour when we're in the top-frame webview + // Use pointerup to mimic native click behaviour when we're in the top-frame webview if (options.device.globalConfig.isTopFrame) { window.addEventListener('pointerup', this, true) } else { diff --git a/swift-package/Resources/assets/autofill-debug.js b/swift-package/Resources/assets/autofill-debug.js index 27b6613f1..21a055277 100644 --- a/swift-package/Resources/assets/autofill-debug.js +++ b/swift-package/Resources/assets/autofill-debug.js @@ -15048,7 +15048,7 @@ class HTMLTooltipUIController extends _UIController.UIController { super(); this._options = options; this._htmlTooltipOptions = Object.assign({}, _HTMLTooltip.defaultOptions, htmlTooltipOptions); - // Use pointerup to mimic click behaviour when we're in the top-frame webview + // Use pointerup to mimic native click behaviour when we're in the top-frame webview if (options.device.globalConfig.isTopFrame) { window.addEventListener('pointerup', this, true); } else { diff --git a/swift-package/Resources/assets/autofill.js b/swift-package/Resources/assets/autofill.js index dc930d41b..6bc8e4009 100644 --- a/swift-package/Resources/assets/autofill.js +++ b/swift-package/Resources/assets/autofill.js @@ -11103,7 +11103,7 @@ class HTMLTooltipUIController extends _UIController.UIController { super(); this._options = options; this._htmlTooltipOptions = Object.assign({}, _HTMLTooltip.defaultOptions, htmlTooltipOptions); - // Use pointerup to mimic click behaviour when we're in the top-frame webview + // Use pointerup to mimic native click behaviour when we're in the top-frame webview if (options.device.globalConfig.isTopFrame) { window.addEventListener('pointerup', this, true); } else {