JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.26/vue.min.js "></script>
<script id="topic-test" type="x-template">
  <div class="topic">
    <div class="topic--inner">
      <div :class="{'is-editable': hasRights}"
            class="topic__text"
            v-el:topic-text
           :tabindex="hasRights ? '0' : false"
           :title="elTopicTextAttrTitle"
            v-html="elTopicTextHtmlContent"
            v-if="!showInput || !hasRights"

           @dblclick="handleDblclick"></div>
      <div class="topic__text  is-editable"
           v-el:topic-text
           v-else>
        <!-- </textarea> --><!-- '"` -->
        <form  action=""
               class="topic__form"
              @submit.prevent="">
          <textarea  class="topic__editable"
                     v-el:topic-editable
                     type="text"
                     v-model="topic"

                    @blur="handleBlur"></textarea>
        </form>
      </div>

      <!-- ... -->
    </div>
  </div>
</script>

<div id="app"></div>

JavaScript

new Vue({
  el: '#app',
  template: '#topic-test',
  
  data () {
    return {
      room: { topic: 'Je fais un test' },
      send: true,
      showInput: false,
      topic: ''
    }
  },

  computed: {
    elTopicTextAttrTitle: function () {
      return 'Double cliquer pour changer le topic.'
    },

    elTopicTextHtmlContent: function () {
      return 'Un topic' // htmlspecialchars ;-)
    },

    hasRights: function () {
      return true
    }
  },

  methods: {
    handleDblclick: function (e) {
      if (!this.hasRights) return

      this.showInput = true
      var _this = this
      this.$nextTick(function () {
        _this.$els.topicEditable.focus()
      })
    },

    handleBlur: function (e) {
      if (!this.hasRights) return

      console.log('blur')
      this.showInput = false

      var _this = this
      this.$nextTick(function () {
        if (_this.send === true) {
          if (_this.room.topic !== _this.topic) {
            if (_this.topic.length === 0) {
              _this.topic = ' '
            }

            console.log(_this.topic)
          }
        }
      })
    }
  }
})