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

Hints.create() cssSelector logic breaks when attrs of either multipleHits or tabbed provided #1678

Closed
avisaiwe opened this issue Feb 23, 2022 · 1 comment

Comments

@avisaiwe
Copy link

Error details

SurfingKeys: 1.0.3
URL: any website

Context

States cssSelector and attrs
https://github.com/brookhong/Surfingkeys/blob/master/docs/API.md#hintscreate

example of how to invoke attrs

Hints.create("", Hints.dispatchMouseClick, {tabbed: true, active: false});

cssSelector works when no attrs

api.mapkey('sj', 'select comments in hacker news', function() {
    api.Hints.create("tbody > tr > td > a+a", api.Hints.dispatchMouseClick);
}, {domain: /news.ycombinator.com/});

cssSelector breaks and default to all elements when multipleHits or tabbed provided in attrs

api.mapkey('sj', 'select comments in hacker news', function() {
    api.Hints.create("tbody > tr > td > a+a", api.Hints.dispatchMouseClick, {multipleHits: true});
}, {domain: /news.ycombinator.com/});
@avisaiwe
Copy link
Author

avisaiwe commented Mar 7, 2022

Tested the change for 1.0.5 and it's working now! tried the mapping above with both multipleHits and tabbed and both worked, wonderful!

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

No branches or pull requests

2 participants