Skip to content

Commit

Permalink
Fixed textarea overflow (#1986)
Browse files Browse the repository at this point in the history
* Fixed textarea overflow

* Updated Change Log
  • Loading branch information
tdurnford authored and corinagum committed May 20, 2019
1 parent 392f9a2 commit d51aa99
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed
- Fix [#1974](https://github.com/Microsoft/BotFramework-WebChat/issues/1974). Update `/docs/` folder to `/media/` and delete unused images, by [@corinagum](https://github.com/corinagum) in PR [#1975](https://github.com/Microsoft/BotFramework-WebChat/pull/1975)
- Fix [#1980](https://github.com/Microsoft/BotFramework-WebChat/issues/1980). Changed sendBoxTextArea styles to break words longer than the textarea, by [@tdurnford](https://github.com/tdurnford) in PR [#1986](https://github.com/Microsoft/BotFramework-WebChat/pull/1986)
- Fix [#1969](https://github.com/Microsoft/BotFramework-WebChat/issues/1969). Move `styleSet`s related to Adaptive Cards to full bundle, by [@corinagum](https://github.com/corinagum) in PR [#1987](https://github.com/Microsoft/BotFramework-WebChat/pull/1987)
- Fix [#1429](https://github.com/Microsoft/BotFramework-WebChat/issues/1429). Changed Markdown-it options to render newline characters correctly, by [@tdurnford](https://github.com/tdurnford) in PR [#1988](https://github.com/Microsoft/BotFramework-WebChat/pull/1988)

Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions __tests__/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,15 @@ test('textarea send on enter', async () => {

expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions);
});

test('textarea long text', async () => {
const { driver } = await setupWebDriver({ props: { styleOptions }});

const textarea = await driver.findElement(By.tagName('textarea'));

await textarea.sendKeys('https://github.com/microsoft/BotFramework-WebChat/blob/master/packages/component/src/Styles/defaultStyleSetOptions.js');

const base64PNG = await driver.takeScreenshot();

expect(base64PNG).toMatchImageSnapshot(imageSnapshotOptions);
});
6 changes: 4 additions & 2 deletions packages/component/src/Styles/StyleSet/SendBoxTextArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ export default function createSendBoxTextAreaStyle({
fontFamily: 'inherit',
fontSize: 'inherit',
height: '100%',
overflowY: 'scroll',
overflowY: 'auto',
whiteSpace: 'pre-wrap',
width: 'inherit',
wordBreak: 'break-word'
},

'& > textarea': {
Expand All @@ -43,7 +44,8 @@ export default function createSendBoxTextAreaStyle({
position: 'absolute',
resize: 'none',
top: 0,
width: '100%'
width: '100%',
wordBreak: 'break-word'
}
}
}
Expand Down

0 comments on commit d51aa99

Please sign in to comment.