From 1571a9a2dfbe6dd3bb598a92f7f62e457b613241 Mon Sep 17 00:00:00 2001
From: Christopher Speller <crspeller@gmail.com>
Date: Thu, 15 Oct 2015 12:07:06 -0400
Subject: Fixing most deprication warnings

---
 web/react/components/textbox.jsx | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

(limited to 'web/react/components/textbox.jsx')

diff --git a/web/react/components/textbox.jsx b/web/react/components/textbox.jsx
index 741dbcd5d..d51fb9523 100644
--- a/web/react/components/textbox.jsx
+++ b/web/react/components/textbox.jsx
@@ -83,7 +83,7 @@ export default class Textbox extends React.Component {
 
     componentDidUpdate() {
         if (this.caret >= 0) {
-            Utils.setCaretPosition(React.findDOMNode(this.refs.message), this.caret);
+            Utils.setCaretPosition(ReactDOM.findDOMNode(this.refs.message), this.caret);
             this.caret = -1;
         }
         if (this.doProcessMentions) {
@@ -97,7 +97,7 @@ export default class Textbox extends React.Component {
         if (!this.addedMention) {
             this.checkForNewMention(nextProps.messageText);
         }
-        const text = React.findDOMNode(this.refs.message).value;
+        const text = ReactDOM.findDOMNode(this.refs.message).value;
         if (nextProps.channelId !== this.props.channelId || nextProps.messageText !== text) {
             this.doProcessMentions = true;
         }
@@ -117,11 +117,11 @@ export default class Textbox extends React.Component {
     }
 
     handleChange() {
-        this.props.onUserInput(React.findDOMNode(this.refs.message).value);
+        this.props.onUserInput(ReactDOM.findDOMNode(this.refs.message).value);
     }
 
     handleKeyPress(e) {
-        const text = React.findDOMNode(this.refs.message).value;
+        const text = ReactDOM.findDOMNode(this.refs.message).value;
 
         if (!this.refs.commands.isEmpty() && text.indexOf('/') === 0 && e.which === 13) {
             this.refs.commands.addFirstCommand();
@@ -130,7 +130,7 @@ export default class Textbox extends React.Component {
         }
 
         if (!this.doProcessMentions) {
-            const caret = Utils.getCaretPosition(React.findDOMNode(this.refs.message));
+            const caret = Utils.getCaretPosition(ReactDOM.findDOMNode(this.refs.message));
             const preText = text.substring(0, caret);
             const lastSpace = preText.lastIndexOf(' ');
             const lastAt = preText.lastIndexOf('@');
@@ -144,7 +144,7 @@ export default class Textbox extends React.Component {
     }
 
     handleKeyDown(e) {
-        if (Utils.getSelectedText(React.findDOMNode(this.refs.message)) !== '') {
+        if (Utils.getSelectedText(ReactDOM.findDOMNode(this.refs.message)) !== '') {
             this.doProcessMentions = true;
         }
 
@@ -154,7 +154,7 @@ export default class Textbox extends React.Component {
     }
 
     handleBackspace() {
-        const text = React.findDOMNode(this.refs.message).value;
+        const text = ReactDOM.findDOMNode(this.refs.message).value;
         if (text.indexOf('/') === 0) {
             this.refs.commands.getSuggestedCommands(text.substring(0, text.length - 1));
         }
@@ -163,7 +163,7 @@ export default class Textbox extends React.Component {
             return;
         }
 
-        const caret = Utils.getCaretPosition(React.findDOMNode(this.refs.message));
+        const caret = Utils.getCaretPosition(ReactDOM.findDOMNode(this.refs.message));
         const preText = text.substring(0, caret);
         const lastSpace = preText.lastIndexOf(' ');
         const lastAt = preText.lastIndexOf('@');
@@ -174,7 +174,7 @@ export default class Textbox extends React.Component {
     }
 
     checkForNewMention(text) {
-        const caret = Utils.getCaretPosition(React.findDOMNode(this.refs.message));
+        const caret = Utils.getCaretPosition(ReactDOM.findDOMNode(this.refs.message));
 
         const preText = text.substring(0, caret);
 
@@ -201,7 +201,7 @@ export default class Textbox extends React.Component {
     }
 
     addMention(name) {
-        const caret = Utils.getCaretPosition(React.findDOMNode(this.refs.message));
+        const caret = Utils.getCaretPosition(ReactDOM.findDOMNode(this.refs.message));
 
         const text = this.props.messageText;
 
@@ -224,14 +224,14 @@ export default class Textbox extends React.Component {
     }
 
     addCommand(cmd) {
-        const elm = React.findDOMNode(this.refs.message);
+        const elm = ReactDOM.findDOMNode(this.refs.message);
         elm.value = cmd;
         this.handleChange();
     }
 
     resize() {
-        const e = React.findDOMNode(this.refs.message);
-        const w = React.findDOMNode(this.refs.wrapper);
+        const e = ReactDOM.findDOMNode(this.refs.message);
+        const w = ReactDOM.findDOMNode(this.refs.wrapper);
 
         const prevHeight = $(e).height();
 
@@ -259,14 +259,14 @@ export default class Textbox extends React.Component {
     }
 
     handleFocus() {
-        const elm = React.findDOMNode(this.refs.message);
+        const elm = ReactDOM.findDOMNode(this.refs.message);
         if (elm.title === elm.value) {
             elm.value = '';
         }
     }
 
     handleBlur() {
-        const elm = React.findDOMNode(this.refs.message);
+        const elm = ReactDOM.findDOMNode(this.refs.message);
         if (elm.value === '') {
             elm.value = elm.title;
         }
-- 
cgit v1.2.3-1-g7c22

