From 178873d4337148e75041c61c9cd1862edaafa37d Mon Sep 17 00:00:00 2001 From: Khoi Nguyen Date: Mon, 14 Aug 2017 14:53:44 +0200 Subject: [FIX] web: fix copy (Ctrl-C) of text field content in Firefox Before this commit, it was not possible to copy the contents of a multiline text field in read-only mode in Firefox without losing all line breaks in the process. This is due to a bug affecting div tags (see https://bugzilla.mozilla.org/show_bug.cgi?id=1390115) in Firefox. This commit ensures that the text in a text field is surrounded by a span (as opposed to div) tag. Note that spans were used in saas-15, so we are in fact simply undoing the change to divs introduced by the new views. --- addons/web/static/src/js/fields/basic_fields.js | 1 + 1 file changed, 1 insertion(+) (limited to 'addons/web/static/src/js/fields/basic_fields.js') diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index 0cb08b55d02..ec04f67e270 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -791,6 +791,7 @@ var FieldFloatTime = FieldFloat.extend({ var FieldText = InputField.extend(TranslatableFieldMixin, { className: 'o_field_text', supportedFieldTypes: ['text'], + tagName: 'span', /** * @constructor -- cgit v1.2.3