SAP / Webchat

The SAP Conversational AI webchat let you deploy a bot straight to a website
https://cai.tools.sap
MIT License
80 stars 200 forks source link

Add minHeight for Webchat textarea #9

Open sathianarayananh opened 6 years ago

sathianarayananh commented 6 years ago

Problem Description Webchat textarea element doesn't have minHeight applied in its style. This causes textarea to load with irregular size on different web pages. Because it inherits the minHeight from parent. In our site, textarea size is large enough to overflow the page size.

Fix Add minHeight (let's say 70px) to textarea style.

_react2.default.createElement('textarea', { ref: function ref(i) { return _this3._input = i; }, value: value, style: {minHeight: 70, width: '100%', maxHeight: 70, resize: 'none' }, placeholder: 'Write a reply...', onChange: function onChange(e) { return _this3.setState({ value: e.target.value }, _this3.autoGrow); }, onKeyPress: function onKeyPress(e) { if (e.key === 'Enter') { _this3.sendMessage(); e.preventDefault(); } }, rows: 1 })

OlivierNguyen commented 6 years ago

Do you have an example of a website where the textarea is broken? It will help us to test the development.