[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
This commit is contained in:
@@ -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: '<form string="Partners">' +
|
||||
'<field name="txt"/>' +
|
||||
'</form>',
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user