summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/react/components/channel_notifications.jsx4
-rw-r--r--web/react/components/mention_list.jsx4
-rw-r--r--web/react/components/textbox.jsx4
3 files changed, 8 insertions, 4 deletions
diff --git a/web/react/components/channel_notifications.jsx b/web/react/components/channel_notifications.jsx
index 638d16576..38bc91682 100644
--- a/web/react/components/channel_notifications.jsx
+++ b/web/react/components/channel_notifications.jsx
@@ -16,12 +16,12 @@ module.exports = React.createClass({
var self = this;
$(this.refs.modal.getDOMNode()).on('show.bs.modal', function(e) {
var button = e.relatedTarget;
- var channel_id = button.dataset.channelid;
+ var channel_id = button.getAttribute('data-channelid');
var notifyLevel = ChannelStore.getMember(channel_id).notify_level;
var quietMode = false;
if (notifyLevel === "quiet") quietMode = true;
- self.setState({ notify_level: notifyLevel, quiet_mode: quietMode, title: button.dataset.title, channel_id: channel_id });
+ self.setState({ notify_level: notifyLevel, quiet_mode: quietMode, title: button.getAttribute('data-title'), channel_id: channel_id });
});
},
componentWillUnmount: function() {
diff --git a/web/react/components/mention_list.jsx b/web/react/components/mention_list.jsx
index 2fecc129a..b666fcfae 100644
--- a/web/react/components/mention_list.jsx
+++ b/web/react/components/mention_list.jsx
@@ -14,7 +14,7 @@ module.exports = React.createClass({
PostStore.addMentionDataChangeListener(this._onChange);
var self = this;
- $('#'+this.props.id).on('keypress.mentionlist',
+ $('body').on('keypress.mentionlist', '#'+this.props.id,
function(e) {
if (!self.isEmpty() && self.state.mentionText != '-1' && e.which === 13) {
e.stopPropagation();
@@ -31,7 +31,7 @@ module.exports = React.createClass({
},
componentWillUnmount: function() {
PostStore.removeMentionDataChangeListener(this._onChange);
- $('#'+this.props.id).off('keypress.mentionlist');
+ $('body').off('keypress.mentionlist', '#'+this.props.id);
},
_onChange: function(id, mentionText, excludeList) {
if (id !== this.props.id) return;
diff --git a/web/react/components/textbox.jsx b/web/react/components/textbox.jsx
index 934e863a2..6b746aa78 100644
--- a/web/react/components/textbox.jsx
+++ b/web/react/components/textbox.jsx
@@ -78,6 +78,8 @@ module.exports = React.createClass({
var re = new RegExp('( |^)@' + m + '( |$|\n)', 'm');
html = html.replace(re, '$1<span class="mention">@'+m+'</span>$2');
}
+ var re2 = new RegExp('(^$)(?![.\n])', 'gm');
+ html = html.replace(re2, '<br/><br/>');
$(this.refs.textdiv.getDOMNode()).html(html);
},
handleChange: function() {
@@ -262,6 +264,8 @@ module.exports = React.createClass({
$(d).css({'height':'auto','overflow-y':'scroll'}).height(167);
$(w).css({'height':'auto'}).height(167);
}
+
+ $(d).scrollTop($(e).scrollTop());
},
handleFocus: function() {
var elm = this.refs.message.getDOMNode();