diff --git a/app/renderer/components/bookmarks/addEditBookmarkForm.js b/app/renderer/components/bookmarks/addEditBookmarkForm.js
index a744a8d50f4..dbedc769eed 100644
--- a/app/renderer/components/bookmarks/addEditBookmarkForm.js
+++ b/app/renderer/components/bookmarks/addEditBookmarkForm.js
@@ -7,7 +7,7 @@ const Immutable = require('immutable')
const {StyleSheet, css} = require('aphrodite/no-important')
// Components
-const BrowserButton = require('../common/browserButton')
+const {BrowserButton} = require('../common/browserButton')
const {
CommonFormSection,
CommonFormDropdown,
diff --git a/app/renderer/components/bookmarks/bookmarksToolbar.js b/app/renderer/components/bookmarks/bookmarksToolbar.js
index 3c302edc403..208205e8e3e 100644
--- a/app/renderer/components/bookmarks/bookmarksToolbar.js
+++ b/app/renderer/components/bookmarks/bookmarksToolbar.js
@@ -9,7 +9,7 @@ const Immutable = require('immutable')
// Components
const ReduxComponent = require('../reduxComponent')
-const BrowserButton = require('../common/browserButton')
+const {BrowserButton} = require('../common/browserButton')
const BookmarkToolbarButton = require('./bookmarkToolbarButton')
// Actions
diff --git a/app/renderer/components/common/browserButton.js b/app/renderer/components/common/browserButton.js
index c6b009eab7c..ee6eb09d22d 100644
--- a/app/renderer/components/common/browserButton.js
+++ b/app/renderer/components/common/browserButton.js
@@ -78,6 +78,30 @@ class BrowserButton extends ImmutableComponent {
}
}
+class NormalizedButton extends ImmutableComponent {
+ render () {
+ return
+ }
+}
+
const buttonSize = '25px'
const styles = StyleSheet.create({
@@ -251,7 +275,20 @@ const styles = StyleSheet.create({
pointerEvents: 'none',
animation: 'none',
opacity: 0.25
+ },
+
+ // ref: https://github.com/brave/browser-laptop/blob/548e11b1c889332fadb379237555625ad2a3c845/less/button.less#L12-L18
+ normalizedButton: {
+ background: 'none',
+ outline: 'none',
+ border: 'none',
+ margin: 0,
+ userSelect: 'none',
+ whiteSpace: 'nowrap'
}
})
-module.exports = BrowserButton
+module.exports = {
+ BrowserButton,
+ NormalizedButton
+}
diff --git a/app/renderer/components/common/messageBox.js b/app/renderer/components/common/messageBox.js
index d797fe7785e..40edd5a9dc3 100644
--- a/app/renderer/components/common/messageBox.js
+++ b/app/renderer/components/common/messageBox.js
@@ -9,7 +9,7 @@ const {StyleSheet, css} = require('aphrodite')
// Components
const ReduxComponent = require('../reduxComponent')
const Dialog = require('./dialog')
-const BrowserButton = require('../common/browserButton')
+const {BrowserButton} = require('../common/browserButton')
const SwitchControl = require('./switchControl')
// Actions
diff --git a/app/renderer/components/download/downloadsBar.js b/app/renderer/components/download/downloadsBar.js
index 8469abdf46b..fa20e4eeb58 100644
--- a/app/renderer/components/download/downloadsBar.js
+++ b/app/renderer/components/download/downloadsBar.js
@@ -9,7 +9,7 @@ const Immutable = require('immutable')
// Components
const ReduxComponent = require('../reduxComponent')
const Button = require('../common/button')
-const BrowserButton = require('../common/browserButton')
+const {BrowserButton} = require('../common/browserButton')
const DownloadItem = require('./downloadItem')
// Actions
diff --git a/app/renderer/components/main/braveryPanel.js b/app/renderer/components/main/braveryPanel.js
index 8f114200234..eee7c9bfabb 100644
--- a/app/renderer/components/main/braveryPanel.js
+++ b/app/renderer/components/main/braveryPanel.js
@@ -9,7 +9,7 @@ const {StyleSheet, css} = require('aphrodite/no-important')
// Components
const ReduxComponent = require('../reduxComponent')
const Dialog = require('../common/dialog')
-const BrowserButton = require('../common/browserButton')
+const {BrowserButton} = require('../common/browserButton')
const SwitchControl = require('../common/switchControl')
const {BraveryPanelDropdown} = require('../common/dropdown')
diff --git a/app/renderer/components/main/checkDefaultBrowserDialog.js b/app/renderer/components/main/checkDefaultBrowserDialog.js
index 3f2e483b183..6ec0a0d21af 100644
--- a/app/renderer/components/main/checkDefaultBrowserDialog.js
+++ b/app/renderer/components/main/checkDefaultBrowserDialog.js
@@ -8,7 +8,7 @@ const {StyleSheet, css} = require('aphrodite/no-important')
// Components
const ReduxComponent = require('../reduxComponent')
const Dialog = require('../common/dialog')
-const BrowserButton = require('../common/browserButton')
+const {BrowserButton} = require('../common/browserButton')
const SwitchControl = require('../common/switchControl')
const {
CommonFormMedium,
diff --git a/app/renderer/components/main/findbar.js b/app/renderer/components/main/findbar.js
index 5bac14fb4d1..85beea2f6c8 100644
--- a/app/renderer/components/main/findbar.js
+++ b/app/renderer/components/main/findbar.js
@@ -7,7 +7,7 @@ const Immutable = require('immutable')
// Components
const ReduxComponent = require('../reduxComponent')
-const BrowserButton = require('../common/browserButton')
+const {BrowserButton} = require('../common/browserButton')
const SwitchControl = require('../common/switchControl')
// Constants
diff --git a/app/renderer/components/main/noScriptInfo.js b/app/renderer/components/main/noScriptInfo.js
index 7a5bfd0193a..980849f26b1 100644
--- a/app/renderer/components/main/noScriptInfo.js
+++ b/app/renderer/components/main/noScriptInfo.js
@@ -10,7 +10,7 @@ const urlParse = require('../../../common/urlParse')
const ReduxComponent = require('../reduxComponent')
const ImmutableComponent = require('../immutableComponent')
const Dialog = require('../common/dialog')
-const BrowserButton = require('../common/browserButton')
+const {BrowserButton} = require('../common/browserButton')
// Actions
const appActions = require('../../../../js/actions/appActions')
diff --git a/app/renderer/components/main/notificationItem.js b/app/renderer/components/main/notificationItem.js
index 3ba54190f8b..8bcf31b8577 100644
--- a/app/renderer/components/main/notificationItem.js
+++ b/app/renderer/components/main/notificationItem.js
@@ -9,7 +9,7 @@ const {StyleSheet, css} = require('aphrodite/no-important')
// Components
const ReduxComponent = require('../reduxComponent')
-const BrowserButton = require('../common/browserButton')
+const {BrowserButton} = require('../common/browserButton')
// Constants
const messages = require('../../../../js/constants/messages')
diff --git a/app/renderer/components/main/updateBar.js b/app/renderer/components/main/updateBar.js
index 46a31fddb26..fd1f419c9eb 100644
--- a/app/renderer/components/main/updateBar.js
+++ b/app/renderer/components/main/updateBar.js
@@ -8,7 +8,7 @@ const {StyleSheet, css} = require('aphrodite/no-important')
// Components
const ImmutableComponent = require('../immutableComponent')
const ReduxComponent = require('../reduxComponent')
-const BrowserButton = require('../common/browserButton')
+const {BrowserButton} = require('../common/browserButton')
// Actions
const appActions = require('../../../../js/actions/appActions')
diff --git a/app/renderer/components/navigation/browserAction.js b/app/renderer/components/navigation/browserAction.js
index 042387c206e..842372bed97 100644
--- a/app/renderer/components/navigation/browserAction.js
+++ b/app/renderer/components/navigation/browserAction.js
@@ -10,7 +10,7 @@ const Immutable = require('immutable')
// Components
const ReduxComponent = require('../reduxComponent')
-const BrowserButton = require('../common/browserButton')
+const {BrowserButton} = require('../common/browserButton')
const BrowserActionBadge = require('./browserActionBadge')
// State
diff --git a/app/renderer/components/navigation/homeButton.js b/app/renderer/components/navigation/homeButton.js
index fb2cee1530b..852a76e14a4 100644
--- a/app/renderer/components/navigation/homeButton.js
+++ b/app/renderer/components/navigation/homeButton.js
@@ -6,6 +6,7 @@ const React = require('react')
// Components
const ImmutableComponent = require('../immutableComponent')
+const {NormalizedButton} = require('../common/browserButton')
// Actions
const appActions = require('../../../../js/actions/appActions')
@@ -29,14 +30,6 @@ class HomeButton extends ImmutableComponent {
this.onHome = this.onHome.bind(this)
}
- componentDidMount () {
- this.homeButton.addEventListener('auxclick', this.onHome)
- }
-
- componentWillUnmount () {
- this.homeButton.removeEventListener('auxclick', this.onHome)
- }
-
onHome (e) {
if (e.button === 2) {
return
@@ -57,10 +50,10 @@ class HomeButton extends ImmutableComponent {
// BEM Level: navigationBar__buttonContainer
render () {
- return