-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix double-click issue #306
Conversation
Signed-off-by: Emanuele Feliziani <feliziani.emanuele@gmail.com>
Note: Password rules outdated
You can update the rules with the following command cd packages/password && npm run rules:update Once you've updated the rules, re-run the build from the root with |
Signed-off-by: Emanuele Feliziani <feliziani.emanuele@gmail.com>
Signed-off-by: Emanuele Feliziani <feliziani.emanuele@gmail.com>
* @returns {Promise<void>} | ||
*/ | ||
async assertClickAndFocusMessages () { | ||
async assertClickMessage () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This stuff now only fires one message, either the click or focus, so I've updated the test cases.
@@ -187,6 +187,9 @@ export class HTMLTooltipUIController extends UIController { | |||
e.preventDefault() | |||
e.stopImmediatePropagation() | |||
|
|||
const isMainMouseButton = e.button === 0 | |||
if (!isMainMouseButton) return | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, just makes it easier to open the devtools in debug builds.
@@ -75,15 +75,19 @@ export class OverlayUIController extends UIController { | |||
}) | |||
this._mutObs.observe(document.body, {childList: true, subtree: true}) | |||
|
|||
const position = getPosition() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The position is now stored right away, so even if it changes after the click we already know the original position and the timeout below doesn't influence it.
input.scrollIntoView(true) | ||
delay = 500 | ||
} | ||
this.#state = 'parentShown' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By setting the parentShown
state right away we avoid multiple fires while the execution is suspended by the timeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/Form/Form.js
Outdated
@@ -484,7 +485,7 @@ class Form { | |||
storedClick.delete(input) | |||
} | |||
|
|||
if (this.shouldOpenTooltip(e, input)) { | |||
if (this.shouldOpenTooltip(e, input) && isVisible(input)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the isVisible
check on input
be part of this.shouldOpenTooltip
, or is there a reason we would want to open the tooltip for a non-visible input?
Signed-off-by: Emanuele Feliziani <feliziani.emanuele@gmail.com>
Task/Issue URL: https://app.asana.com/0/1204538113123459/1204538113123459 Autofill Release: https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/6.5.1 ## Description Updates Autofill to version [6.5.1](https://github.com/duckduckgo/duckduckgo-autofill/releases/tag/6.5.1). ### Autofill 6.5.1 release notes ## What's Changed * Disable pixel for all platforms but extension by @GioSensation in duckduckgo/duckduckgo-autofill#309 * Fix release script for BSK by @GioSensation in duckduckgo/duckduckgo-autofill#310 Included in 6.5.0: - Improve debugging by @GioSensation in duckduckgo/duckduckgo-autofill#293 - Reduce the calls on check position when there are many mutations by @alistairjcbrown in duckduckgo/duckduckgo-autofill#288 - Window release fetch tags before checkout by @alistairjcbrown in duckduckgo/duckduckgo-autofill#296 - Autofill compare generated test suites by @greyivy in duckduckgo/duckduckgo-autofill#283 - Update release scripts with latest Apple tooling by @GioSensation in duckduckgo/duckduckgo-autofill#299 - Add temporary incontext_eligible pixel by @GioSensation in duckduckgo/duckduckgo-autofill#304 - Fix double-click issue by @GioSensation in duckduckgo/duckduckgo-autofill#306 - Fix a whole bunch of existing failing test cases by @GioSensation in duckduckgo/duckduckgo-autofill#308 **Full Changelog**: duckduckgo/duckduckgo-autofill@6.5.0...6.5.1 ## Steps to test This release has been tested during autofill development. For smoke test steps see [this task](https://app.asana.com/0/1198964220583541/1200583647142330/f). Co-authored-by: GioSensation <GioSensation@users.noreply.github.com>
Reviewer: @alistairjcbrown
Asana: https://app.asana.com/0/0/1204520802024813/f
Description
Fixes a potential issue on desktop apps. More info on Asana.
Steps to test
See Asana task.