diff options
| author | Sébastien Theys <seb@odoo.com> | 2018-08-21 16:13:41 +0200 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2018-08-22 11:51:30 +0200 |
| commit | 14b9e9c92d990f208141f1b40e410581206a1321 (patch) | |
| tree | 4f414b4e55de8418ef7e012ff2785d73fb41a806 /addons/web/static/tests/fields/basic_fields_tests.js | |
| parent | 289adeb63f51a9af26b8f383ba80089aa7aa6d87 (diff) | |
[FIX] web: give correct size to o2m textarea at init
Before this commit, a textarea inside a one2many would only have the correct size after focus or on change.
When we select a line, we want all of the textarea of the line to have the correct size even if they are not directly focused.
Task: 1869469
PR: #26430
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
| -rw-r--r-- | addons/web/static/tests/fields/basic_fields_tests.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/addons/web/static/tests/fields/basic_fields_tests.js b/addons/web/static/tests/fields/basic_fields_tests.js index 3e545ad1681..0c7a1163708 100644 --- a/addons/web/static/tests/fields/basic_fields_tests.js +++ b/addons/web/static/tests/fields/basic_fields_tests.js @@ -1457,7 +1457,7 @@ QUnit.module('basic_fields', { form.destroy(); }); - QUnit.test('text fields edit mode inside list have correct height on focus', function (assert) { + QUnit.test('text fields in editable list have correct height', function (assert) { assert.expect(2); this.data.partner.records[0].txt = "a\nb\nc\nd\ne\nf"; @@ -1467,13 +1467,15 @@ QUnit.module('basic_fields', { model: 'partner', data: this.data, arch: '<list editable="top">' + + '<field name="foo"/>' + '<field name="txt"/>' + '</list>', }); - // Click to enter edit: in this test we specifically rely on setting - // the focus on the textarea to trigger the resize. - // The main goal is to test the size is correct, not how it is triggered. + // Click to enter edit: in this test we specifically do not set + // the focus on the textarea by clicking on another column. + // The main goal is to test the resize is actually triggered in this + // particular case. list.$('.o_data_cell:first').click(); var $textarea = list.$('textarea:first'); |
