Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7909299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:21:16+00:00 2026-06-03T12:21:16+00:00

I have in-place editing set up for a network model. There are two input

  • 0

I have in-place editing set up for a network model. There are two input fields, for the title and the description of the model. When the user clicks on the title, it switches out the <h2> tags for an <input>, much as in the canonical Todos example.

I am adding events to the relevant template like this:

Template.network_edit.events = {}

Template.network_edit.events['click #network-description'] = -> 
    Session.set('editing_network_description',true)
    Meteor.flush()
    focus_field_by_id('network-description-input')

Template.network_edit.events['click #network-title'] = -> 
    Session.set('editing_network_title',true)
    Meteor.flush()
    focus_field_by_id('network-title-input')

The focus_field_by_id function is,

  var focus_field_by_id = function (id) {
  var input = document.getElementById(id);
  if (input) {
    input.focus();
    input.select();
  }
};

Everything works as expected, but when I click on the #network-description, I see an error in the console:

Uncaught TypeError: Cannot read property 'parentNode' of null

Thrown at line 600 of liveui.js. When I click on #network-title, I receive no such error.

If I reverse the order of the events, putting the #network-title event first, and the network-description second, I receive the error when I click on the #network-title instead. In general, the first event added throws this error, but not subsequent events.

As I said, everything appears works properly (the inputs appear, gain focus, etc.), but the error is disconcerting and I may be missing something.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:21:19+00:00Added an answer on June 3, 2026 at 12:21 pm

    Aha, I was able to reproduce this.

    This is a bug that occurs when the DOM is mutated during event handling. After the call to Meteor.flush(), the original target of the event is no longer in the template. Meteor’s event processing code chokes, probably while checking to see if the second handler applies, hence why the first one seems to break. The error is harmless, and you aren’t doing anything wrong.

    Event handling is being rewritten for the next release, and I have a regression test in place for this case that the new code already passes.

    Thanks for the report and for your patience.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have create to fields in my form and I have place in, two
I have a UITableViewController subclass. I set self.editing = YES at the end of
i have set a notification when user enters in specific location. what happen when
I have this function to unlock a list the user is currently editing: function
I have the following jQuery script to show a model dialog to enable editing
I'm trying to implement edit in place functionality for a description field, where editing
We have place a button on a view. When we press it, nothing happens.
In my string I have place holders like: ##NEWSLETTER## , ##FOOTER# ##GOOGLEANALYTICS## etc. Each
We have a place in a code of such form: void processParam(Object param) {
I have a place in my Django app where I need to construct a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.