diff --git a/app/talk/comment.cjsx b/app/talk/comment.cjsx index d5551094f7..0f54196826 100644 --- a/app/talk/comment.cjsx +++ b/app/talk/comment.cjsx @@ -28,7 +28,7 @@ module?.exports = React.createClass onDeleteComment: React.PropTypes.func # passed (commentId) on click onLikeComment: React.PropTypes.func # passed (commentId) on like onClickReply: React.PropTypes.func # passed (user, comment) on click - active: React.PropTypes.bool # optional active switch + active: React.PropTypes.bool # optional active switch: scroll window to comment and apply styling getDefaultProps: -> active: false @@ -37,6 +37,10 @@ module?.exports = React.createClass editing: false commentValidationErrors: [] + componentDidMount: -> + if @props.active + React.findDOMNode(@).scrollIntoView() + onClickReply: (e) -> @props.onClickReply(@props.user, @props.data)