From e595722139fc71f94fecef07eacc986094e83f0b Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 4 Oct 2014 15:37:18 +0200 Subject: [PATCH] Safari hanging on password input creation Fix #3997 --- couchpotato/static/scripts/page/settings.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/couchpotato/static/scripts/page/settings.js b/couchpotato/static/scripts/page/settings.js index c8e0a5e4..b5aae3d1 100644 --- a/couchpotato/static/scripts/page/settings.js +++ b/couchpotato/static/scripts/page/settings.js @@ -560,11 +560,19 @@ Option.Password = new Class({ create: function(){ var self = this; - self.parent(); - self.input.set('type', 'password'); + self.el.adopt( + 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.set('value', '') + self.input.set('value', ''); + self.input.set('type', 'password'); }) }