Skip to content

Commit

Permalink
Add dist.
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoda committed Dec 5, 2016
1 parent d76d811 commit ba80bf1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
10 changes: 10 additions & 0 deletions dist/libs/key_events.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,22 @@ function isModifierPressed(e) {
return (e.ctrlKey || e.keyCode === 91 || e.metaKey) && e.shiftKey;
}

function focusInInput(e) {
return (/input|textarea/i.test(e.target.tagName) || e.target.getAttribute('contenteditable') !== null
);
}

function handle(e) {
if (e.keyCode === (0, _keycode2.default)('escape')) {
// We don't need to preventDefault escape.
// Just getting the event is enough for us.
return features.ESCAPE;
}
if (focusInInput(e)) {
// if we're focused in an element that accepts input,
// then we shouldn't perform a shortcut action
return false;
}

if (!isModifierPressed(e)) return false;

Expand Down
3 changes: 2 additions & 1 deletion dist/modules/ui/components/down_panel/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ exports.default = {
background: 'white',
borderRadius: 4,
border: 'solid 1px rgb(236, 236, 236)',
marginTop: 5
marginTop: 5,
width: '100%'
},

tabbar: {
Expand Down
2 changes: 1 addition & 1 deletion dist/modules/ui/components/left_panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ var scrollStyle = {
};

var mainStyle = {
padding: 20
padding: '10px 0 10px 10px'
};

var storyProps = ['stories', 'selectedKind', 'selectedStory', 'onSelectStory'];
Expand Down

0 comments on commit ba80bf1

Please sign in to comment.