From e0c5e6abd4712a05bb662650b75db3dc93b08e3e Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Mon, 19 Jun 2017 20:50:01 -0700 Subject: [PATCH] =?UTF-8?q?[FIX]=20point=5Fof=5Fsale:=20display=20PIN=20as?= =?UTF-8?q?=20=E2=80=A2's=20across=20all=20browsers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this the -webkit-text-security CSS property was used. This, as the name implies, only works in webkit based browsers. Instead we can just render the PIN code as •'s since the value of the inputBuffer is used (not the rendered text) when checking the PIN. Fixes #16458 --- addons/point_of_sale/static/src/css/pos.css | 1 - addons/point_of_sale/static/src/js/popups.js | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index 465704844c1..6cb28f6a71f 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -2328,7 +2328,6 @@ td { } .pos .popup-password .popup-input { width: 70%; - -webkit-text-security: disc; } .pos .popup .body ul, diff --git a/addons/point_of_sale/static/src/js/popups.js b/addons/point_of_sale/static/src/js/popups.js index 80ce043561a..8ee2a35667a 100644 --- a/addons/point_of_sale/static/src/js/popups.js +++ b/addons/point_of_sale/static/src/js/popups.js @@ -238,6 +238,11 @@ var PasswordPopupWidget = NumberPopupWidget.extend({ this._super(); this.$('.popup').addClass('popup-password'); }, + click_numpad: function(event){ + this._super.apply(this, arguments); + var $value = this.$('.value'); + $value.text($value.text().replace(/./g, '•')); + }, }); gui.define_popup({name:'password', widget: PasswordPopupWidget});