From 416b810eb504df9cc1b3ec6d24fb921734c526a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Wed, 22 Aug 2018 12:11:00 +0200 Subject: [FIX] web: prevent textarea vertical resize on chrome Since we correctly compute the height of the field, we don't want to let the user resize it vertically. This was already working on Firefox because it doesn't require the field to be in the DOM to read the resize attribute, but Chrome does require the field to already be in DOM. Task: 1869469 PR: #26518 --- .../web/static/tests/fields/basic_fields_tests.js | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'addons/web/static/tests/fields/basic_fields_tests.js') diff --git a/addons/web/static/tests/fields/basic_fields_tests.js b/addons/web/static/tests/fields/basic_fields_tests.js index 0c7a1163708..b608ed36913 100644 --- a/addons/web/static/tests/fields/basic_fields_tests.js +++ b/addons/web/static/tests/fields/basic_fields_tests.js @@ -1457,6 +1457,29 @@ QUnit.module('basic_fields', { form.destroy(); }); + QUnit.test('text fields in edit mode, no vertical resize', function (assert) { + assert.expect(1); + + var form = createView({ + View: FormView, + model: 'partner', + data: this.data, + arch: '
' + + '' + + '', + res_id: 1, + }); + + form.$buttons.find('.o_form_button_edit').click(); + + var $textarea = form.$('textarea:first'); + + assert.strictEqual($textarea.css('resize'), 'none', + "should not have vertical resize"); + + form.destroy(); + }); + QUnit.test('text fields in editable list have correct height', function (assert) { assert.expect(2); -- cgit v1.2.3