Skip to content

Commit 4e584d3

Browse files
committed
Better windows handling
1 parent 6440961 commit 4e584d3

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

src/app/containers/App.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,19 @@ class App extends Component {
6767
<Dispatcher options={options} />
6868
}
6969
<div style={styles.buttonBar}>
70-
{!window.isElectron && position !== 'left' &&
70+
{!window.isElectron && position !== '#left' &&
7171
<Button
7272
Icon={LeftIcon}
7373
onClick={() => { this.openWindow('left'); }}
7474
/>
7575
}
76-
{!window.isElectron && position !== 'right' &&
76+
{!window.isElectron && position !== '#right' &&
7777
<Button
7878
Icon={RightIcon}
7979
onClick={() => { this.openWindow('right'); }}
8080
/>
8181
}
82-
{!window.isElectron && position !== 'bottom' &&
82+
{!window.isElectron && position !== '#bottom' &&
8383
<Button
8484
Icon={BottomIcon}
8585
onClick={() => { this.openWindow('bottom'); }}
@@ -95,7 +95,9 @@ class App extends Component {
9595
<SliderButton isOpen={sliderIsOpen} />
9696
<ImportButton />
9797
<ExportButton liftedState={liftedState} />
98-
<PrintButton />
98+
{position && (position !== '#popup' || navigator.userAgent.indexOf('Firefox') !== -1) &&
99+
<PrintButton />
100+
}
99101
{!window.isElectron &&
100102
<Button
101103
Icon={RemoteIcon}

src/browser/extension/background/openWindow.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ export default function openDevToolsWindow(position) {
2626
options.url = chrome.extension.getURL(url + '#' + position.substr(position.indexOf('-') + 1));
2727
chrome.windows.create(options, (win) => {
2828
windows[position] = win.id;
29+
if (navigator.userAgent.indexOf('Firefox') !== -1) {
30+
chrome.windows.update(win.id, { focused: true, ...customOptions });
31+
}
2932
});
3033
}
3134
});

src/browser/views/includes/style.jade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
style.
22
html {
33
min-width: 350px;
4-
min-height: 200px;
4+
min-height: 400px;
55
height: 100%;
66
width: 100%;
77
}

0 commit comments

Comments
 (0)