nextcloud / passman-webextension

Webextension for the Passman Nextcloud app. Also offers browser extension & Android app.
https://passman.cc
GNU Affero General Public License v3.0
114 stars 43 forks source link

Improve autofocus #224

Closed noplanman closed 6 years ago

noplanman commented 6 years ago

Would be brilliant if there were some autofocus improvements, to not need the mouse to click into obvious text fields.

Examples where automatically focusing the input field would be helpful:

brantje commented 6 years ago

Hi there, I think #114 is same as this one. Auto focus is not possible in the browser popup. For the password picker i need to check, not sure if iframes can claim autofocus

noplanman commented 6 years ago

Yes it is! It would just make life that bit easier 😇

(Sorry I didn't find that one, as closed issues were filtered out, d'oh!)

IBBoard commented 6 years ago

I've hit this a few times with the "Search" section. It feels odd to click Search and then have to click in to the text box.

If the auto-focus attribute doesn't work, is it possible to hook it in to the JavaScript? Something's already happening to change the "tab" content, so it'd be nice to push the focus there as well.

Or could it be some REALLY funky CSS - like those "click and it expands" search boxes, where it looks like you're clicking on the icon but actually you're already clicking in to an input field that then expands?

brantje commented 6 years ago

Thing is, everything operates within a iFrame, so the limitations of iFrames apply. Might have some time after Christmas to try and error.

IBBoard commented 6 years ago

I don't know if I understand the extension sufficiently, but the bit that I'm thinking about (and which I thought the original "When clicking the search icon" was about) is when you click Passman in the toolbar and then click the magnifying glass then it'd be nice if it auto-focused the "Search for" input box.

I can see that auto-focus into the page might be prevented (because you don't want extensions to do bad things) but I'd assumed that that whole pop-up is a single iFrame and that you could do most things within there.

It's only minor, but just a nice bit of usability if you didn't need that extra click 😊

brantje commented 6 years ago

We are still talking about the password picker right? Not this screen: image

noplanman commented 6 years ago

@brantje Both! It should be the same behaviour in both instances (as far as possible)

IBBoard commented 6 years ago

@brantje I was mainly focused on that one. It's the one I encounter the problem with most (because I use it to look up non-website passwords from Passman).

I'm only a webdev, not an extensions dev, but given that you could change the bottom half of that screen when you clicked the magnifying glass then it didn't seem impossible to focus the input box as well as part of the same scripting.