This is a migrated thread and some comments may be shown as answers.

Popup grid is not removing DOM elements when done with window

1 Answer 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan Miser
Top achievements
Rank 1
Dan Miser asked on 08 Aug 2012, 07:46 PM
1. Using Chrome, go here: http://demos.kendoui.com/web/grid/editing-popup.html 
2. Right-click and inspect element, and then search for the word 'window' (no quotes). Note that it finds 2 instances.
3. Click on Add new record, and then Cancel
4. Right-click and inspect element, and then search for the word 'window' (no quotes). Note that it now finds 8 instances. If you repeat 3 and 4, it will go up by 6 instances each time, which means that the DOM elements are being left when dismissing the popup dialog.

This is an issue for us because we are using a Template with some javascript to do some dynamic display of other controls based on a combobox value. Because of this issue, we aren't making the proper controls (in)visible because it is finding other instances of the controls from the other windows that are still in the DOM.

Can you suggest a workaround until this gets resolved? Thanks.

1 Answer, 1 is accepted

Sort by
0
Clint
Top achievements
Rank 1
answered on 13 Aug 2012, 08:03 PM
I noticed this as well.  What you can do to get around this is simply look at the last window.

For instance, let's say you have a field named "department" and wanted to look at the current window value --

$('input[name="department"]:last').val();

Obviously that can be adapted for the situation.  This was just one example, but :last will get you the most recent/current window info.

Tags
Grid
Asked by
Dan Miser
Top achievements
Rank 1
Answers by
Clint
Top achievements
Rank 1
Share this question
or