1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 10:46:32 +00:00

Fix: minor features

設定ボタンアイコンの変更
削除Modalでcmd+enterの使用
検索バーデザイン
This commit is contained in:
Rokt33r
2015-07-30 00:00:45 +09:00
parent c6ef86cbbe
commit 211fd8b28a
7 changed files with 22 additions and 24 deletions

View File

@@ -7,11 +7,15 @@ var SnippetDeleteModal = React.createClass({
close: React.PropTypes.func,
snippet: React.PropTypes.object
},
componentDidMount: function () {
React.findDOMNode(this).focus()
},
stopPropagation: function (e) {
e.stopPropagation()
},
handleKeyDown: function (e) {
if ((e.keyCode === 13 && e.metaKey)) {
console.log(e)
if (e.keyCode === 13 && e.metaKey) {
e.preventDefault()
this.submit()
}
@@ -21,7 +25,7 @@ var SnippetDeleteModal = React.createClass({
},
render: function () {
return (
<div onKeyDown={this.handleKeyDown} onClick={this.stopPropagation} className='SnippetDeleteModal modal'>
<div tabIndex='3' onKeyDown={this.handleKeyDown} onClick={this.stopPropagation} className='SnippetDeleteModal modal'>
<div className='modal-header'>
<h1>Delete Snippet</h1>
</div>