GithubHelp home page GithubHelp logo

Comments (11)

 avatar commented on July 18, 2024 1

Will find an appropriate place to add the fix:

window.onload = function() {
document.getElementById("searchField").focus();
};

from find.

brandon1024 avatar brandon1024 commented on July 18, 2024

Not only should the search field request focus, it should also select any text that is in the input field.

from find.

 avatar commented on July 18, 2024

@brandon1024 not sure if I understand the wording of your last comment, but do you mean if I have something highlighted, and press ctrl+shift+f, it will appear in the search bar?

from find.

 avatar commented on July 18, 2024

@brandon1024 pertaining to my last comment, I understand now. As it stand, it the input field "value" maintained after the extension is closed? If not will need to save last input, then select as you suggest...

from find.

brandon1024 avatar brandon1024 commented on July 18, 2024

@MikeWalz11 I'll try to elaborate a bit better. In your second comment, you did bring up a point that I hadn't actually considered.

So if I press ctrl-f and type something into the search field, and I were to press ctrl-f again, the text in the search field should become selected. Also, like you said, the previous search query should be stored and inserted into the search field when the extension loads.

Now, that will be a bit more challenging because all scripts are unloaded when the extension closes. We will need to use the chrome.storage API for that. Wouldn't be a big problem though.

Should these changes all be wrapped under this issue? I'm fine if it is.

from find.

 avatar commented on July 18, 2024

Will use to save last user input upon close: https://developer.chrome.com/extensions/storage

from find.

 avatar commented on July 18, 2024

@brandon1024 lol didnt see your comment about chrome api till after I found it on stackOF. I will cover everything talked about in this issue. All the required changes seem very minor.

from find.

brandon1024 avatar brandon1024 commented on July 18, 2024

@MikeWalz11 I decided to separate the storage part of this issue. That will be fixed in #40 :)

So in this issue, all we will need to do is make the search text field request focus when the popup is opened, and ensure that text in the field (there won't be any for now, but will be once the aforementioned issue is fixed) is selected/highlighted.

We will fix this issue first, and then after that, we will fix #40.

from find.

brandon1024 avatar brandon1024 commented on July 18, 2024

@MikeWalz11 was this fixed in the recent F37 merge?

from find.

 avatar commented on July 18, 2024

@brandon1024 #40 and #37 are now both resolved from Previous PR

from find.

 avatar commented on July 18, 2024

Resolved in PR: #43

from find.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.