From dfd338a399aea2f999419f7119f625dd790ffd2e Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Sun, 16 Apr 2017 00:28:24 +0200 Subject: [PATCH] Remove the password prompt input type hack The browsers have become smarter and made this hack no longer functional. Since this is now enforced by practically all browsers, there is nothing more we can do about this. It is up to the user to serve the viewer over HTTPS or deal with the warning. Note that this is in no way specific for PDF.js. Any site with password inputs served over HTTP has this problem right now. This hack was provided as a convenience for the users, but nothing more than that. --- web/password_prompt.js | 2 -- web/viewer.html | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/web/password_prompt.js b/web/password_prompt.js index 2a2db4e6e..8730ba996 100644 --- a/web/password_prompt.js +++ b/web/password_prompt.js @@ -60,7 +60,6 @@ class PasswordPrompt { open() { OverlayManager.open(this.overlayName).then(() => { - this.input.type = 'password'; this.input.focus(); var promptString = mozL10n.get('password_label', null, @@ -78,7 +77,6 @@ class PasswordPrompt { close() { OverlayManager.close(this.overlayName).then(() => { this.input.value = ''; - this.input.type = ''; }); } diff --git a/web/viewer.html b/web/viewer.html index 766fc2b47..d08f6392e 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -307,8 +307,7 @@ See https://github.com/adobe-type-tools/cmap-resources

Enter the password to open this PDF file:

- - +