0

I am building on a standard form driven user login panel. Works well enough. All browsers recognize the pattern as a login panel and helpfully offer to store passwords. The way the user login information is then later recalled varies by browser. I focus here on FF, but the problem is universal.

Like any standard form, my login form comprises basic INPUT tags. W3C says that INPUT tags should fire ONCHANGE only ONBLUR. If I wanted to drive an OK (submit) button, say, that was disabled until some information was entered into my form, then W3C standard-compliance means that my OK button does not become enabled until the user clicks away from the field. I don't much like this behaviour and throughout my app, my INPUT tags are backed by JS code that fires ONCHANGE the moment a modifier key goes down. That's all dandy. However...

When FF recognizes my login form, it suggests to recall my login information. When I accept, FF helpfully fills in the two fields and ... my OK button remains disabled (because my keyboard driver, which detects the modifier keys and fires the ONCHANGE event, remains unaware of the form change; FF has pasted the information into the field without the use of the keyboard buffer).

Has anyone come across this problem before and discovered what event browsers fire when information appears "out of nowhere" in an INPUT field?

Thanks.

Ollie2893
  • 302
  • 1
  • 4
  • 11

1 Answers1

0

You're not the first, see: Trigger javascript event when using Google auto fill on firefox which suggests http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-mutationevents

Community
  • 1
  • 1
Bryce
  • 7,335
  • 6
  • 51
  • 71
  • Ah - good spot, Bryce. I did not think I'd be the first. I have come across the Mutation Event before. This is not standard yet and I am reluctant to go down this route. I love the sheer brutality of the setTimeOut() method, mind. Might give that a try... – Ollie2893 Aug 26 '10 at 19:33