[Error] [Vue warn]: Error in nextTick: "TypeError: Cannot read property 'removeChild' of null"

  • I am getting this error in the QTooltip in a QTr/QTd:

    found in
    ---> <QTooltip>
                 <LiveViewTable> at src/components/LiveViewTable.vue
                   <Archive> at src/pages/Archive.vue
                         <LayoutDefault> at src/layouts/default.vue
                           <App> at src/App.vue

    Last line is the offending code:

      mounted () {
        this.$nextTick(() => {
            The following is intentional.
            Fixes a bug in Chrome regarding offsetHeight by requiring browser
            to calculate this before removing from DOM and using it for first time.
          this.$el.offsetHeight // eslint-disable-line
          this.anchorEl = this.$el.parentNode

    My HTML:

              <q-td key="message" :props="props">
                <q-tooltip v-if="props && canShowPopover(props.row)" anchor="top middle" self="bottom middle">{{ getMessagePopover(props.row) }}</q-tooltip>
                {{ getMessage(props.row) }}

    And the functions:

        getMessage: function (row) {
          if (row.message.length > this.truncateLength) {
            return row.message.substring(0, this.truncateLength) + '...'
          return row.message
        canShowPopover: function (row) {
          if (row && row.message) {
            return row.message.length > this.truncateLength
          return false
        getMessagePopover: function (row) {
          return row.message

    Has anyone else seen this? Is this a legitimate bug?

    Maybe the code should read like this:

    this.anchorEl = this.$el.parentNode
    if (this.anchorEl) {

    I should mention this works fine on existing data. It’s when data is dynamically added to the row.

  • It’s not exactly like your code, but it seems to work without errors. 😄



  • I forked your sample to be more like what I am doing and not seeing the error in colsole either:


    But, for the life of me, I can’t figure out why this.anchorEl ends up being null.

  • Maybe jsfiddle doesn’t show the console error because it’s hosted in an iframe?

  • I changed it to a v-show (instead of the v-if) and I no longer get the issue. Still would like to know why. 😞

  • Yeah. Sounds strange.


Log in to reply