diff --git a/src/controllers/molecules/MEmoteTile.js b/src/controllers/molecules/MEmoteTile.js index 1fb117ceef..d32d8ae911 100644 --- a/src/controllers/molecules/MEmoteTile.js +++ b/src/controllers/molecules/MEmoteTile.js @@ -24,7 +24,7 @@ linkifyMatrix(linkify); module.exports = { componentDidMount: function() { - linkifyElement(this.refs.content.getDOMNode(), linkifyMatrix.options); + linkifyElement(this.refs.content, linkifyMatrix.options); } }; diff --git a/src/controllers/molecules/MNoticeTile.js b/src/controllers/molecules/MNoticeTile.js index aceb029495..597ce3cd10 100644 --- a/src/controllers/molecules/MNoticeTile.js +++ b/src/controllers/molecules/MNoticeTile.js @@ -23,6 +23,6 @@ linkifyMatrix(linkify); module.exports = { componentDidMount: function() { - linkifyElement(this.refs.content.getDOMNode(), linkifyMatrix.options); + linkifyElement(this.refs.content, linkifyMatrix.options); } }; diff --git a/src/controllers/molecules/MTextTile.js b/src/controllers/molecules/MTextTile.js index 1fb117ceef..d32d8ae911 100644 --- a/src/controllers/molecules/MTextTile.js +++ b/src/controllers/molecules/MTextTile.js @@ -24,7 +24,7 @@ linkifyMatrix(linkify); module.exports = { componentDidMount: function() { - linkifyElement(this.refs.content.getDOMNode(), linkifyMatrix.options); + linkifyElement(this.refs.content, linkifyMatrix.options); } }; diff --git a/src/controllers/molecules/MessageComposer.js b/src/controllers/molecules/MessageComposer.js index c2b67c7898..7bb2ef9c18 100644 --- a/src/controllers/molecules/MessageComposer.js +++ b/src/controllers/molecules/MessageComposer.js @@ -130,7 +130,7 @@ module.exports = { componentDidMount: function() { this.dispatcherRef = dis.register(this.onAction); this.sentHistory.init( - this.refs.textarea.getDOMNode(), + this.refs.textarea, this.props.room.roomId ); }, @@ -143,14 +143,14 @@ module.exports = { onAction: function(payload) { switch (payload.action) { case 'focus_composer': - this.refs.textarea.getDOMNode().focus(); + this.refs.textarea.focus(); break; } }, onKeyDown: function (ev) { if (ev.keyCode === KeyCode.ENTER) { - var input = this.refs.textarea.getDOMNode().value; + var input = this.refs.textarea.value; if (input.length === 0) { ev.preventDefault(); return; @@ -179,7 +179,7 @@ module.exports = { var self = this; setTimeout(function() { - if (self.refs.textarea && self.refs.textarea.getDOMNode().value != '') { + if (self.refs.textarea && self.refs.textarea.value != '') { self.onTypingActivity(); } else { self.onFinishedTyping(); @@ -188,13 +188,13 @@ module.exports = { }, onEnter: function(ev) { - var contentText = this.refs.textarea.getDOMNode().value; + var contentText = this.refs.textarea.value; var cmd = SlashCommands.processInput(this.props.room.roomId, contentText); if (cmd) { ev.preventDefault(); if (!cmd.error) { - this.refs.textarea.getDOMNode().value = ''; + this.refs.textarea.value = ''; } if (cmd.promise) { cmd.promise.done(function() { @@ -241,12 +241,12 @@ module.exports = { action: 'message_send_failed' }); }); - this.refs.textarea.getDOMNode().value = ''; + this.refs.textarea.value = ''; ev.preventDefault(); }, onTab: function(ev, sortedMembers) { - var textArea = this.refs.textarea.getDOMNode(); + var textArea = this.refs.textarea; if (!this.tabStruct.completing) { this.tabStruct.completing = true; this.tabStruct.index = 0; diff --git a/src/controllers/organisms/RoomView.js b/src/controllers/organisms/RoomView.js index 931dbb5bcb..105392de0b 100644 --- a/src/controllers/organisms/RoomView.js +++ b/src/controllers/organisms/RoomView.js @@ -49,7 +49,7 @@ module.exports = { componentWillUnmount: function() { if (this.refs.messageWrapper) { - var messageWrapper = this.refs.messageWrapper.getDOMNode(); + var messageWrapper = this.refs.messageWrapper; messageWrapper.removeEventListener('drop', this.onDrop); messageWrapper.removeEventListener('dragover', this.onDragOver); messageWrapper.removeEventListener('dragleave', this.onDragLeaveOrEnd); @@ -83,7 +83,7 @@ module.exports = { // scroll to bottom var messageWrapper = this.refs.messageWrapper; if (messageWrapper) { - messageWrapper = messageWrapper.getDOMNode(); + messageWrapper = messageWrapper; messageWrapper.scrollTop = messageWrapper.scrollHeight; } break; @@ -111,7 +111,7 @@ module.exports = { if (room.roomId != this.props.roomId) return; if (this.refs.messageWrapper) { - var messageWrapper = this.refs.messageWrapper.getDOMNode(); + var messageWrapper = this.refs.messageWrapper; this.atBottom = ( messageWrapper.scrollHeight - messageWrapper.scrollTop <= (messageWrapper.clientHeight + 150) @@ -155,7 +155,7 @@ module.exports = { componentDidMount: function() { if (this.refs.messageWrapper) { - var messageWrapper = this.refs.messageWrapper.getDOMNode(); + var messageWrapper = this.refs.messageWrapper; messageWrapper.addEventListener('drop', this.onDrop); messageWrapper.addEventListener('dragover', this.onDragOver); @@ -171,7 +171,7 @@ module.exports = { componentDidUpdate: function() { if (!this.refs.messageWrapper) return; - var messageWrapper = this.refs.messageWrapper.getDOMNode(); + var messageWrapper = this.refs.messageWrapper; if (this.state.paginating && !this.waiting_for_paginate) { var heightGained = messageWrapper.scrollHeight - this.oldScrollHeight; @@ -190,7 +190,7 @@ module.exports = { fillSpace: function() { if (!this.refs.messageWrapper) return; - var messageWrapper = this.refs.messageWrapper.getDOMNode(); + var messageWrapper = this.refs.messageWrapper; if (messageWrapper.scrollTop < messageWrapper.clientHeight && this.state.room.oldState.paginationToken) { this.setState({paginating: true}); @@ -241,7 +241,7 @@ module.exports = { onMessageListScroll: function(ev) { if (this.refs.messageWrapper) { - var messageWrapper = this.refs.messageWrapper.getDOMNode(); + var messageWrapper = this.refs.messageWrapper; var wasAtBottom = this.atBottom; this.atBottom = messageWrapper.scrollHeight - messageWrapper.scrollTop <= messageWrapper.clientHeight; if (this.atBottom && !wasAtBottom) { diff --git a/src/controllers/templates/Register.js b/src/controllers/templates/Register.js index 53d1ad1219..59377b55f8 100644 --- a/src/controllers/templates/Register.js +++ b/src/controllers/templates/Register.js @@ -87,7 +87,7 @@ module.exports = { var scriptTag = document.createElement('script'); window.mx_on_recaptcha_loaded = this.onCaptchaLoaded; scriptTag.setAttribute('src', global.location.protocol+"//www.google.com/recaptcha/api.js?onload=mx_on_recaptcha_loaded&render=explicit"); - this.refs.recaptchaContainer.getDOMNode().appendChild(scriptTag); + this.refs.recaptchaContainer.appendChild(scriptTag); } },