Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
prevent Dialog from being uncloseable with long text
Browse files Browse the repository at this point in the history
- Fix #7930
- Auditors: @luixxiul
  • Loading branch information
cezaraugusto committed Apr 26, 2017
1 parent 8da5411 commit 633987e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
11 changes: 9 additions & 2 deletions app/renderer/components/common/messageBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const {StyleSheet, css} = require('aphrodite')
const commonStyles = require('../styles/commonStyles')
const globalStyles = require('../styles/global')

const ScrollableContent = require('./scrollableContent')

class MessageBox extends ImmutableComponent {
constructor () {
super()
Expand Down Expand Up @@ -116,7 +118,9 @@ class MessageBox extends ImmutableComponent {
{this.title}
</div>
<div className={css(styles.body)} data-test-id='msgBoxMessage'>
{this.message}
<ScrollableContent>
{this.message}
</ScrollableContent>
</div>
{
this.showSuppress
Expand Down Expand Up @@ -154,7 +158,10 @@ const styles = StyleSheet.create({
marginTop: globalStyles.spacing.dialogInsideMargin,
minWidth: '425px',
marginBottom: globalStyles.spacing.dialogInsideMargin,
userSelect: 'text'
userSelect: 'text',
maxHeight: '300px',
overflowY: 'auto',
overflowX: 'hidden'
},
buttons: {
display: 'flex',
Expand Down
6 changes: 5 additions & 1 deletion app/renderer/components/styles/commonStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ const styles = StyleSheet.create({
// Issue #7949
padding: `${globalStyles.spacing.dialogInsideMargin} 30px`,
position: 'absolute',
top: globalStyles.spacing.dialogTopOffset
top: globalStyles.spacing.dialogTopOffset,
// Issue #7930
boxSizing: 'border-box',
maxWidth: '600px',
maxHeight: '500px'
},

// itemList.less
Expand Down
6 changes: 4 additions & 2 deletions app/renderer/components/styles/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ const globalStyles = {
paymentsMargin: '20px',
modalPanelHeaderMarginBottom: '.5em',
paddingHorizontal: '30px',
privateTabPadding: '40px'
privateTabPadding: '40px',
scrollBarSize: '10px'
},
shadow: {
switchShadow: 'inset 0 1px 4px rgba(0, 0, 0, 0.35)',
Expand All @@ -154,7 +155,8 @@ const globalStyles = {
lightBoxShadow: '0 2px 2px lightGray',
insetShadow: 'inset -5px 0 15px rgba(0, 0, 0, 0.25)',
orangeButtonShadow: '0 2px 0 braveDarkOrange',
bookmarkHangerArrowUpShadow: '-2px 2px 3px 0px rgba(0, 0, 0, 0.1)'
bookmarkHangerArrowUpShadow: '-2px 2px 3px 0px rgba(0, 0, 0, 0.1)',
braveComponentsShadow: '0px 1px 5px -1px rgba(0, 0, 0, 0.5)'
},
transition: {
transitionDuration: '100ms',
Expand Down

0 comments on commit 633987e

Please sign in to comment.