Skip to content
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

Merged
merged 4 commits into from
May 3, 2023
Merged

Conversation

GioSensation
Copy link
Member

@GioSensation GioSensation commented May 3, 2023

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.

Signed-off-by: Emanuele Feliziani <feliziani.emanuele@gmail.com>
@GioSensation GioSensation self-assigned this May 3, 2023
@github-actions
Copy link

github-actions bot commented May 3, 2023

Note: Password rules outdated

fccaccessonline.com not present in current
	rules: minlength: 8; maxlength: 14; max-consecutive: 3; required: lower; required: upper; required: digit; required: [!#$%*^_];

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 npm run build and then commit all changes.

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 () {
Copy link
Member Author

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

Copy link
Member Author

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()
Copy link
Member Author

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'
Copy link
Member Author

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.

@GioSensation GioSensation marked this pull request as ready for review May 3, 2023 08:43
Copy link
Member

@alistairjcbrown alistairjcbrown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

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)) {
Copy link
Member

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>
@GioSensation GioSensation merged commit 1de12c3 into main May 3, 2023
CDRussell pushed a commit to duckduckgo/Android that referenced this pull request May 8, 2023
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>
@GioSensation GioSensation deleted the ema/fix-double-click-vulnerability branch August 8, 2023 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants