FloatLabel.js icon indicating copy to clipboard operation
FloatLabel.js copied to clipboard

Refresh bug in Firefox

Open itsmattsoria opened this issue 11 years ago • 4 comments

This plugin is great! I'm getting a bug in Firefox (25.0.1) where after visiting the page with the form that is using FloatLabel.js, even if the form isn't touched or filled out, the next time the page is visited the <label> get's displayed twice - once as the floated label, and once as a value of the form field. Here is a screencast showing the issue: http://d.pr/v/1Wqe

Has anyone else experienced this isssue? Firefox bug?

itsmattsoria avatar Dec 18 '13 09:12 itsmattsoria

Hey Matt,

Thanks for sending over the screencast. Will take a look into it when I've got a chance. The demo at http://labs.mikemitchell.co.uk/FloatLabelJS/ actually uses a slightly older version of the plugin than the current repo, and I can't replicate the behaviour there so it must be to do with the last additions made.

Thanks again

m10l avatar Dec 18 '13 19:12 m10l

@m10l No problem! Yeah, I see that. When I get a second I'll look through the last few commits and see if I can spot anything too - thanks a lot!

itsmattsoria avatar Dec 18 '13 20:12 itsmattsoria

Hi, I just tried to implement this plugin and ran into same problem. For me it solves commenting (or deleting) these lines and adding placeholder to the input: https://github.com/m10l/FloatLabel.js/blob/master/jquery.FloatLabel.js#L18 https://github.com/m10l/FloatLabel.js/blob/master/jquery.FloatLabel.js#L27 https://github.com/m10l/FloatLabel.js/blob/master/jquery.FloatLabel.js#L38

Basically setting label text as input value isn't best idea, even though I guess it's for legacy support? If you don't mind losing the support for IE9-, you can do the same change as I did. It might be nice to add an option for legacy support into the options object. Or you can just force displaying of label via css.

DavidKadlec avatar Jan 08 '15 10:01 DavidKadlec

Please add autocomplete="off" to form and problem will disappear :D

w3rdan avatar Feb 16 '19 12:02 w3rdan