Skip to content

Commit 17e6e4e

Browse files
Chat: override box-sizing value on scrollable-content on ios to 'border-box' (#28425)
1 parent 98bcb8d commit 17e6e4e

File tree

2 files changed

+14
-0
lines changed
  • packages

2 files changed

+14
-0
lines changed

packages/devextreme-scss/scss/widgets/base/chat/layout/chat-messagelist/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
&.dx-scrollable-native-ios {
2020
.dx-scrollable-content {
2121
min-height: 100%;
22+
box-sizing: border-box;
2223
}
2324
}
2425
}

packages/devextreme/testing/tests/DevExpress.ui.widgets/chatParts/messageList.tests.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
} from './chat.tests.js';
1313
import MessageGroup from '__internal/ui/chat/messagegroup';
1414
import TypingIndicator from '__internal/ui/chat/typingindicator';
15+
import devices from '__internal/core/m_devices';
1516
import localization from 'localization';
1617
import dateLocalization from 'localization/date';
1718

@@ -28,6 +29,7 @@ const CHAT_LAST_MESSAGEGROUP_ALIGNMENT_END_CLASS = 'dx-chat-last-messagegroup-al
2829
const CHAT_MESSAGEBUBBLE_CLASS = 'dx-chat-messagebubble';
2930
const CHAT_TYPINGINDICATOR_CLASS = 'dx-chat-typingindicator';
3031
const SCROLLVIEW_REACHBOTTOM_INDICATOR = 'dx-scrollview-scrollbottom';
32+
const SCROLLABLE_CONTENT = 'dx-scrollable-content';
3133

3234
const MS_IN_DAY = 86400000;
3335

@@ -67,6 +69,17 @@ QUnit.module('MessageList', () => {
6769
assert.ok(this.instance instanceof MessageList);
6870
});
6971

72+
QUnit.test('scrollable content box-sizing value should be border-box', function(assert) {
73+
if(devices.real().platform !== 'ios') {
74+
assert.ok(true, 'test does not actual other than ios');
75+
return;
76+
}
77+
const $scrollableContent = this.$element.find(`.${SCROLLABLE_CONTENT}`);
78+
const scrollBoxSizing = $scrollableContent.css('box-sizing');
79+
80+
assert.strictEqual(scrollBoxSizing, 'border-box', 'scrollable content has right box-sizing value');
81+
});
82+
7083
QUnit.test('should not be any errors if the items contain undefined values', function(assert) {
7184
const items = [{}, undefined, {}];
7285

0 commit comments

Comments
 (0)