Skip to content

Commit

Permalink
Set '-webkit-app-region: no-drag' to browserButton
Browse files Browse the repository at this point in the history
Closes brave#11111
Requires brave#10951 to make the shield button non-draggable

Auditors: @cezaraugusto

Test Plan:
1. Open brave.com
2. Enable NoScript
3. Enable an extension
4. Make sure NoScript button, the extension button, and publisher button is not draggable
  • Loading branch information
Suguru Hirahara authored and syuan100 committed Nov 9, 2017
1 parent 3fea78f commit a38e2ef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/renderer/components/common/browserButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ const styles = StyleSheet.create({
// cf: https://github.com/brave/browser-laptop/blob/548e11b1c889332fadb379237555625ad2a3c845/less/button.less#L49
color: globalStyles.button.color,

// See #11111
WebkitAppRegion: 'no-drag',

':hover': {
color: globalStyles.button.default.hoverColor
}
Expand Down Expand Up @@ -181,7 +184,6 @@ const styles = StyleSheet.create({
},

browserButton_extensionItem: {
WebkitAppRegion: 'no-drag',
backgroundSize: 'contain',
height: '17px',
margin: '4px 0 0 0',
Expand Down
1 change: 0 additions & 1 deletion app/renderer/components/navigation/publisherToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ const styles = StyleSheet.create({
width: globalStyles.spacing.buttonWidth,
minHeight: globalStyles.spacing.buttonHeight,
minWidth: globalStyles.spacing.buttonWidth,
WebkitAppRegion: 'no-drag',
borderWidth: '1px 1px 1px 0px',
borderStyle: 'solid',
borderColor: globalStyles.color.urlBarOutline,
Expand Down
1 change: 0 additions & 1 deletion app/renderer/components/navigation/urlBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ const styles = StyleSheet.create({
},

noScriptContainer__button: {
WebkitAppRegion: 'no-drag',
backgroundImage: `url(${iconNoScript})`,

// Override the default value defined by browserButton on browserButton.js
Expand Down

0 comments on commit a38e2ef

Please sign in to comment.