From 367898b580bfdc0d2dd8663b130d74982e74c090 Mon Sep 17 00:00:00 2001 From: Jan Johannes Date: Fri, 30 Sep 2016 13:22:03 +0200 Subject: [PATCH 1/2] feat: show other new tab options on long click on new tab button Fixes https://github.com/brave/browser-laptop/issues/4398 --- js/components/tabs.js | 18 ++++++++++++++---- js/contextMenus.js | 20 ++++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/js/components/tabs.js b/js/components/tabs.js index 61b55980dc7..be4dc890453 100644 --- a/js/components/tabs.js +++ b/js/components/tabs.js @@ -11,8 +11,9 @@ const windowActions = require('../actions/windowActions') const windowStore = require('../stores/windowStore') const dragTypes = require('../constants/dragTypes') const cx = require('../lib/classSet') +const contextMenus = require('../contextMenus') -const Button = require('./button') +const LongPressButton = require('./longPressButton') const Tab = require('./tab') const dnd = require('../dnd') const dndData = require('../dndData') @@ -87,6 +88,10 @@ class Tabs extends ImmutableComponent { windowActions.newFrame() } + onNewTabLongPress (rect) { + contextMenus.onNewTabContextMenu(rect) + } + render () { this.tabRefs = [] const index = this.props.previewTabPageIndex !== undefined @@ -125,10 +130,15 @@ class Tabs extends ImmutableComponent { onClick={this.onNextPage} /> } })()} -