LibriVox / librivox-catalog

LibriVox catalog and reader workflow application
https://librivox.org
MIT License
37 stars 17 forks source link

Project Template Generator pulling data into Translator field? #108

Open twinkietoes-on opened 3 years ago

twinkietoes-on commented 3 years ago

I'm using a Chrome browser on an iMac. As I fill in the template, from top to bottom, I leave the five fields in the "Information about the Translator(s)" group blank, and proceed further down the form. When I get to the "Additional Information About The Work" group, I complete the Copyright year and Brief Summary, and then when I get to the "Summary by" field - and this is the crucial part - what I have been doing is typing the letter "P" (first letter of my first name) and then, as Chrome immediately provides "Peter Dann" for me as a possible auto-completion, I have been selecting that auto-completion from the dropdown. The moment I do that, Chrome populates the "Last name" and "First name(s)" fields in the "Information about the Translator(s)" group with my first and last names - quite unnoticed by me, until now.

Is this something we can mitigate?

notartom commented 3 years ago

We could try setting the autocomplete=off attribute on our <input>s. It should prevent Chrome from auto-filling them with whatever user information it has, at least according to [1]. It shouldn't interfere with our own autocomplete, which done within the application and is independent of the browser.

[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete

kgroeneveld commented 3 years ago

We could try setting the autocomplete=off attribute on our <input>s.

Having the browser auto complete fields is a nice feature though. I use it all the time while testing the Project Template Generator.

The part I don't understand is why Chrome would auto fill in the Translator fields while the focus is in the Summary By field. I wonder if we have some crazy JavaScript issue triggering this? The author and translator fields have some JavaScript associated with them to do things like clear all the fields when the last name field is deleted by the user and for our own auto complete stuff.

I am curious to install Chrome somewhere and see if I can even duplicate the issue in the first place. Maybe something useful would show up in the Chrome debug console

kgroeneveld commented 3 years ago

I installed Chrome in a Windows 10 virtual machine. I can't seem to duplicate the issue.

But if you google around there are lots of complaints about weirdness with Chrome auto fill / auto complete with many different workarounds that seem to work / break with random versions of Chome.

One interesting thing I found was the setting show-autofill-type-predictions in chrome://flags. With this option on when you hover over the Summary By field it says the section is trans_last_name[1]. So Chrome is associating the field with the translator last name field somehow. My theory that something in our JavaScript is causing this is starting to look less and less likely.