From 591d74becf63c9265375a5703424a7ee6018825a Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Tue, 8 Mar 2016 16:18:17 +0100 Subject: [PATCH] [FIX] point_of_sale: do not select payment input when hidden Edge >=12 throws an error (code 800a025e) when calling the select() method on an input element that is not currently part of document and has a non-empty value. When adding a paymentline a "change:selected_paymentline" event gets triggered which in turn triggers the focus_selected_line function before the actual paymentline gets rendered. opw-671426 --- addons/point_of_sale/static/src/js/screens.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 94794d6a3be..517b4333ab3 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1179,7 +1179,12 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa input.value = ''; }else{ input.value = value; - input.select(); + + // Microsoft Edge >= 12 crashes (code 800a025e) when calling + // select on a non-empty input element not part of document + if (! this.hidden) { + input.select(); + } } } },