Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

js-error while editing in all browsers

$
0
0
Hi there

I found a bug adding and startEditing a record of the listgrid.
This happens if you add the element, leave the window with the mouse and wait several seconds.
Another way to reproduce this is to click the button, and move the mouse into the console-menu.

This happens in all browsers e.g. Chrome or IE11

Also firefox returns an error (TypeError: _8 is null)

Its tested with the latest nightly (v10.0p_2015-03-17)

This is the code to reproduce this behaviour.
Code:

isc.ListGrid.create({
        "ID" : "theMainGrid",
        "width" : "100%",
        "height" : "100%",
        "selectionType" : "multiple",
        "canEdit" : true,
        "editEvent" : "doubleClick",
        "autoSaveEdits" : false,
        "selectionProperty" : "isSelected",
        "fields" :
        [{
                        "name" : "textField",
                        "title" : "title",
                        "type" : "text",
                        "width" : "280",
                        "canEdit" : true,

                }
        ]
});
isc.MenuButton.create({
        "ID" : "addMenuButton",
        top : 100,
        left : 100,
        "title" : "new",
        menu : isc.Menu.create({
                "selectionType" : "single",
                "canEdit" : false,
                "data" :
                [{

                                "click" : function (p1, p2, p3, p4) {
                                        isc.showPrompt('Loading...');
                                        theMainGrid.setData([{
                                                        "textField" : "new element",
                                                        "mainGridElementIndex" : "1"
                                                        }
                                                ]);
                                        theMainGrid.selectSingleRecord(theMainGrid.data.find("mainGridElementIndex", 1));
                                        theMainGrid.startEditing(theMainGrid.data.indexOf(theMainGrid.getSelectedRecord()));
                                        isc.clearPrompt();
                                },
                                "title" : "click here"
                        }
                ]
        })
})

best

Viewing all articles
Browse latest Browse all 4756

Trending Articles