Code Monkey home page Code Monkey logo

Comments (31)

sureshJaggarapu avatar sureshJaggarapu commented on August 19, 2024 2

Thank you so much @stephanrauh, I can understand, it is okay for me even though bug will resolve in latest version. we have a plan to upgrade application version in next month.

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

That's really weird. I have no idea what's happening. I don't see any autocompletions on my machine, nor do I see any reason why your username (of all things!) should be in the autocomplete list.

Be that as it may, I suppose it's a good idea to switch off the auto-completion list altogether. That's what I did just a few moments ago. Hope that helps!

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

The bug fix is planned for version 0.9.8. Currently, this release is blocked by #6, but I intent to publish it soon.

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

I've just published version 0.9.8. Would you mind to test the bug fix and confirm it works on your machine, too?

Thanks in advance,
Stephan

from ngx-extended-pdf-viewer.

therawk avatar therawk commented on August 19, 2024

Hi Stephan,
thanks for your effort! Unfortunately, the new version has the same issue. I guess it is related to chrome. In one of my forms I tried to use autocomplete="off" but Chrome seems to ignore it since - according to Google - "Users want to be able to save their passwords in forms".

On Stackoverflow the recommendations were using either autocomplete="nope", autocomplete="new-password" or autocomplete="dfoijdfke" <- some random string.

I thought something might collide with my forms/app/anything. But here see the video of a fresh set-up application:

https://streamable.com/73r4h

As soon as the viewer loads the key appears next to the favourites button. I will fiddle around with the template this weekend and try to figure out what causes this. Not sure if you use FireFox or another browser where this problem doesn't occur (on my end, too).

Also since you said you don't have this issue, maybe take a look if the key appears in your chrome url bar as this might help you see if the problem still occurs.

I will get back to you as soon as I got some more free time but feel free to reply back I will read and try

Greets
Paul

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

The problem might be the missing name attribute. Plus, adding a semantic autofill="search-input-field" sounds like a good idea.

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

BTW, I'm using Chrome almost all of the time. But it's the Mac version, so there may be a difference.

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

I've optimized the autofill settings in the 0.9.9 release. Hope it works now!

from ngx-extended-pdf-viewer.

vovka-s avatar vovka-s commented on August 19, 2024

@stephanrauh
Hi!
The problem is back in 13.0.0 release
Please fix it again

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

Yeah, the base library (pdf.js) modified the source code of the dialogs, so you might be right.

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

I didn't manage to reproduce the bug. What do I have to do to see the error?

from ngx-extended-pdf-viewer.

vovka-s avatar vovka-s commented on August 19, 2024

Sorry, my error is different from the one described in the issue

  • I have an angular-ionic app
  • One of screens contains search input, some other elements and the button
  • pdf viewer is shown in separate modal window on click on the button
  • After closing the modal window the input field on the first screen become populated with login data

So the problem appears not on search bar in pdf viewer, but in other independent input field in the app

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

And the login data stems from the password field of the PDF viewer?

Be that as it may, probably the best solution is to set autocomplete="off" or autocomplete="new-password" in your input field. Maybe your browser detects "my" password field and "your" input field and believes them to be username and password.

If https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete and https://stackoverflow.com/questions/2530/how-do-you-disable-browser-autocomplete-on-web-form-field-input-tags are correct, I also need to implement a bugfix. Four years ago, I followed an advice that specifically told me to set autocomplete="some-unique-identifier", but it seems that advice targeted several Chrome versions that implemented the W3C standard in a non-standard way.

By the way, please apologize the sluggish answer: A nasty flu sent me to bed this week.

from ngx-extended-pdf-viewer.

vovka-s avatar vovka-s commented on August 19, 2024

And the login data stems from the password field of the PDF viewer?

No, the password field works correctly. Login data appears in my input after I close the PDF viewer...

Be that as it may, probably the best solution is to set autocomplete="off" or autocomplete="new-password" in your input field. Maybe your browser detects "my" password field and "your" input field and believes them to be username and password.

I'll try to play with autocomplete settings.

By the way, please apologize the sluggish answer: A nasty flu sent me to bed this week.

It's okay, I hope the flu subsided and now you are completely healthy

from ngx-extended-pdf-viewer.

danielehrhardt avatar danielehrhardt commented on August 19, 2024

And the login data stems from the password field of the PDF viewer?

No, the password field works correctly. Login data appears in my input after I close the PDF viewer...

Be that as it may, probably the best solution is to set autocomplete="off" or autocomplete="new-password" in your input field. Maybe your browser detects "my" password field and "your" input field and believes them to be username and password.

I'll try to play with autocomplete settings.

By the way, please apologize the sluggish answer: A nasty flu sent me to bed this week.

It's okay, I hope the flu subsided and now you are completely healthy

Non of these Solutions work for me.

from ngx-extended-pdf-viewer.

danielehrhardt avatar danielehrhardt commented on August 19, 2024

Sorry, my error is different from the one described in the issue

  • I have an angular-ionic app
  • One of screens contains search input, some other elements and the button
  • pdf viewer is shown in separate modal window on click on the button
  • After closing the modal window the input field on the first screen become populated with login data

So the problem appears not on search bar in pdf viewer, but in other independent input field in the app

Same behavoir.

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

Please update to version 14.0.5 and tell me if it solves the problem.

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

Oh, and thanks for nudging me - I'd totally forgotten about this issue!

from ngx-extended-pdf-viewer.

danielehrhardt avatar danielehrhardt commented on August 19, 2024

I see this Problem again in my Application.

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

Are you using the current version? Was it gone in the meantime?

from ngx-extended-pdf-viewer.

danielehrhardt avatar danielehrhardt commented on August 19, 2024

Are you using the current version? Was it gone in the meantime?

Yes, latest
"ngx-extended-pdf-viewer": "^14.5.3",

I had a workaround so i am not sure but not it picks new values. It looks like it is coming from the chrome autocomplete the Value.

from ngx-extended-pdf-viewer.

HannesMittag avatar HannesMittag commented on August 19, 2024

I have the same issue, also using the current version

from ngx-extended-pdf-viewer.

mkvashennikov avatar mkvashennikov commented on August 19, 2024

I have the same issue, also using the current version

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

Strange.

@HannesMittag @danielehrhardt @mkvashennikov Would you mind to examine the HTML code of the #findInput field? My bugfix simply added the attribute autocomplete="off".

  • Is it missing in your application?
  • If it's there, which browser are you using?
  • Or should I add a different attribute? I'm asking because every browser seems to interpret the attribute slightly different, and I can't even reproduce the bug on my machine.

Here's what it looks like on my machine:

<input _ngcontent-qsa-c71="" autocomplete="off" id="findInput" title="Suchen" data-l10n-id="find_input" name="search-input-field" class="toolbarField" placeholder="Im Dokument suchen…" data-status="" aria-invalid="false">

image

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

Version 15.0.0 sets the type of the password field to "hidden" except for the time the password field is shown. After that, the type is set to "hidden" again, and the value of the field is emptied. That should prevent browsers from autofilling login data in any of the input fields.

from ngx-extended-pdf-viewer.

danielehrhardt avatar danielehrhardt commented on August 19, 2024

That should prevent browsers from autofilling login data in any of the input fields.

What i do not understand is why this happens at all? What does the PDF View has to do with autocomplete?

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

Nothing. But the browser can't know that. It simply sees there's a password field. It almost never shows - unless you're opening a password-protected document (see this demo: https://pdfviewer.net/extended-pdf-viewer/passwords).

Thing is, the password field is part of the DOM tree, and I can't easily change that. The browsers don't seem to mind that the password is hidden. They just see an ordinary input field with a low tab index and the next input field is the password field. That's enough to trick at least some browsers into believing the two fields are a combination of login field and password field.

Adding insult to injury, that's a not a standard. It's a proprietary addition of the browsers, so each browser manufacturer does it a bit differently, and tweaks the algorithms every once in a while.

from ngx-extended-pdf-viewer.

danielehrhardt avatar danielehrhardt commented on August 19, 2024

Nothing. But the browser can't know that. It simply sees there's a password field. It almost never shows - unless you're opening a password-protected document (see this demo: https://pdfviewer.net/extended-pdf-viewer/passwords).

Thing is, the password field is part of the DOM tree, and I can't easily change that. The browsers don't seem to mind that the password is hidden. They just see an ordinary input field with a low tab index and the next input field is the password field. That's enough to trick at least some browsers into believing the two fields are a combination of login field and password field.

Adding insult to injury, that's a not a standard. It's a proprietary addition of the browsers, so each browser manufacturer does it a bit differently, and tweaks the algorithms every once in a while.

Ah I understand!

from ngx-extended-pdf-viewer.

sureshJaggarapu avatar sureshJaggarapu commented on August 19, 2024

Hi,
There is one issue which we are getting in all browsers when generating the pdf, the element of passowrd id is not match to the any of the field elements in the form.

is there any alternative way to handle this issue from angualr componet?
angualr version : 15.2.6
ngx-extend-pdf-viewer: 15.2.2
image

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

@sureshJaggarapu I've opened a dedicated ticket. IMHO that's a very strange but because the field #password is present in the DOM.

BTW, I'm afraid I can't support old versions of ngx-extended-pdf-viewer. I'd love to do so, but I don't have enough time to spare, so I focus on the latest version of the library. That's why I've scheduled your issue to version 21 despite knowing you're using an older version.

from ngx-extended-pdf-viewer.

stephanrauh avatar stephanrauh commented on August 19, 2024

I think it's basically a Chrome bug, but even so, I believe to have found a solution. It's landed with version 21.0.0-alpha.12.

from ngx-extended-pdf-viewer.

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.