[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.
This commit is contained in:
Khoi Nguyen
2017-08-14 15:27:58 +02:00
parent 7978f846d1
commit 178873d433
2 changed files with 30 additions and 4 deletions
@@ -791,6 +791,7 @@ var FieldFloatTime = FieldFloat.extend({
var FieldText = InputField.extend(TranslatableFieldMixin, {
className: 'o_field_text',
supportedFieldTypes: ['text'],
tagName: 'span',
/**
* @constructor