Safari hanging on password input creation

Fix #3997
This commit is contained in:
Ruud committed 2014-10-04 15:37:18 +02:00
1 parent 78ba855c68
commit e595722139
1 file changed
+11 -3
+11 -3
View File
@@ -560,11 +560,19 @@ Option.Password = new Class({
create: function(){ create: function(){
var self = this; var self = this;
self.parent(); self.el.adopt(
self.input.set('type', 'password'); self.createLabel(),
self.input = new Element('input.inlay', {
'type': 'text',
'name': self.postName(),
'value': self.getSettingValue() ? '********' : '',
'placeholder': self.getPlaceholder()
})
);
self.input.addEvent('focus', function(){ self.input.addEvent('focus', function(){
self.input.set('value', '') self.input.set('value', '');
self.input.set('type', 'password');
}) })
} }