autocomplete=off in HTML prevents FF and Chrome from preserving fields on clicking Back button, so reset it using JS
parent
9bb35ba0eb
commit
f2320f0aa4
|
@ -370,7 +370,10 @@ var SimpleAutocomplete = function(input, dataLoader, multipleDelimiter, onChange
|
||||||
self.hide = function()
|
self.hide = function()
|
||||||
{
|
{
|
||||||
if (!self.skipHideCounter)
|
if (!self.skipHideCounter)
|
||||||
|
{
|
||||||
self.hintLayer.style.display = 'none';
|
self.hintLayer.style.display = 'none';
|
||||||
|
self.input.autocomplete = 'on';
|
||||||
|
}
|
||||||
else
|
else
|
||||||
self.skipHideCounter = 0;
|
self.skipHideCounter = 0;
|
||||||
};
|
};
|
||||||
|
@ -384,6 +387,7 @@ var SimpleAutocomplete = function(input, dataLoader, multipleDelimiter, onChange
|
||||||
self.hintLayer.style.top = (p.top+self.input.offsetHeight) + 'px';
|
self.hintLayer.style.top = (p.top+self.input.offsetHeight) + 'px';
|
||||||
self.hintLayer.style.left = p.left + 'px';
|
self.hintLayer.style.left = p.left + 'px';
|
||||||
self.hintLayer.style.display = '';
|
self.hintLayer.style.display = '';
|
||||||
|
self.input.autocomplete = 'off';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue