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

  • Home
  • SEARCH
  • 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 6730241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:23:09+00:00 2026-05-26T10:23:09+00:00

I have code like this: _removeSelection : function(e, refocus) { var thisObj = e.data,

  • 0

I have code like this:

_removeSelection : function(e, refocus) {

  var thisObj      = e.data,
      lineItem     = $(this).closest('li'),
      templateData = lineItem.data('templateData');

  thisObj.element.trigger('beforeRemoveSelection',[templateData]);

  lineItem.remove();

  thisObj._selection_items = $(thisObj._selections).find('li');

  if ( ( refocus != 'undefined' && refocus === true ) || refocus == 'undefined') {
    thisObj.refocus();
  }

  thisObj.element.trigger('toggleSelection');
  thisObj.element.trigger('limitNotHit', [true]);
  thisObj.element.trigger('removeSelection',[templateData]);

}

Everything logs fine and it appears to execute fine. However after all my code runs I get an exception:

“Object doesn’t support property or method ‘getAttribute'”

So I have a loop that calls the function X times, but it only runs the function to completion once.

EDIT: The loop triggers a click on an element which runs that function. If I manually trigger the click using firebug, it still throws exception

EDIT 2: The exception is thrown at line 4550 in jquery-1.6.2.js

Doing lineItem[0].parentNode.removeChild( lineItem[0] ); also causes delayed exception. Looks like @zzzz is right about some weird cache cleanup.

This only happens when using .trigger(‘click’), not when actually clicking on the element

  • 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-05-26T10:23:09+00:00Added an answer on May 26, 2026 at 10:23 am

    I believe this is because IE bubbles the click event to a node that no longer exists (and then jQuery tries to do something with that?).

    I assume because your click removes the parent element, so when it tries to bubble to that element it breaks.

    Anyways, I have seen the exact same thing in IE when using backbone.js to re-render on change events – change event bubbles up but node no longer exists (because its been rendered again so it’s a new node) and it fires this error.

    Using event.stopPropagation [ http://api.jquery.com/event.stopPropagation/ ] has worked to solve this for me in the past, give it a shot.

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

Sidebar

Related Questions

I have code like this var MyObj = { f1 : function(o){ o.onmousedown =
I have code like this: private var video:Video; ... private function init():void { ...
I have code like this: $(.delete).click(function() { var commentContainer = $(this).parent(); var id =
I have code like this: var newMsg = new Msg { Var1 = var1,
i have code like this but its not working var t = r.text(100, 100,
i have code like this: <script type=text/javascript> var _gaq = _gaq || []; _gaq.push(['_setAccount',
Assume I have code like this: var svc = new Namespace.SvcClient(); var request =
I have code like this: class ToBeTested { function simpleMethod($param) { if(0 === $param)
I have code like this: CREATE FUNCTION gantistok (@id VARCHAR(8), @id_t INT) RETURNS INT
If I have code like this: class Person { $age; $height; $more_stuff_about_the_person; function about()

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.