1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

編集警告が出ている時にCode editorがキー入力を認識する問題解決

This commit is contained in:
Rokt33r
2015-11-30 16:22:10 +09:00
parent de83447cb3
commit 57998ba727
2 changed files with 8 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ articleCount = #999
.userProfileName .userProfileName
color brandColor color brandColor
font-size 28px font-size 28px
padding 6px 0 0 10px padding 6px 37px 0 10px
white-space nowrap white-space nowrap
text-overflow ellipsis text-overflow ellipsis
overflow hidden overflow hidden

View File

@@ -1,8 +1,13 @@
import React, { PropTypes } from 'react' import React, { PropTypes } from 'react'
import ReactDOM from 'react-dom'
import store from 'boost/store' import store from 'boost/store'
import { unlockStatus, clearNewArticle } from 'boost/actions' import { unlockStatus, clearNewArticle } from 'boost/actions'
export default class EditedAlert extends React.Component { export default class EditedAlert extends React.Component {
componentDidMount () {
ReactDOM.findDOMNode(this.refs.no).focus()
}
handleNoButtonClick (e) { handleNoButtonClick (e) {
this.props.close() this.props.close()
} }
@@ -22,8 +27,8 @@ export default class EditedAlert extends React.Component {
<div className='message'>Do you really want to leave without finishing?</div> <div className='message'>Do you really want to leave without finishing?</div>
<div className='control'> <div className='control'>
<button onClick={e => this.handleNoButtonClick(e)}><i className='fa fa-fw fa-close'/> No</button> <button ref='no' onClick={e => this.handleNoButtonClick(e)}><i className='fa fa-fw fa-close'/> No</button>
<button onClick={e => this.handleYesButtonClick(e)} className='primary'><i className='fa fa-fw fa-check'/> Yes</button> <button ref='yes' onClick={e => this.handleYesButtonClick(e)} className='primary'><i className='fa fa-fw fa-check'/> Yes</button>
</div> </div>
</div> </div>
) )