Results 1 to 2 of 2

Thread: Getting "Cannot read property 'isVisible' of undefined" error for grid cell editing

  1. #1
    Sencha User
    Join Date
    Aug 2015
    Location
    India
    Posts
    24

    Default Getting "Cannot read property 'isVisible' of undefined" error for grid cell editing

    Hi,

    I am using cell editing for a grid column. I am creating textarea inside the cell. In production version of IE, I am getting an error where once I click on that cell, cursor will be pointed to the textarea. After which where ever I click, the textarea will be having the focus.

    In Chrome, it works fine for development, production and testing version. But, in IE it works only for development and testing version not in production.

    As I have seen, in ext-all-rtl-debug,

    Code:
    // Class 'Ext.grid.plugin.CellEditing'
    
    startEdit: function(record, columnHeader,
        context) {
        var me = this,
            useCurrentActiveEditor, isFieldEditable, currentActiveEditor, newEditor;
        if (!context) {
            me.preventBeforeCheck = true;
            context = me.callParent(arguments); // suspicious
            delete me.preventBeforeCheck;
            if (context === false) {
                return false;
            }
        }
        if (context && context.view.isVisible(true)) {
            record = context.record;
            columnHeader = context.column;
            isFieldEditable = (columnHeader && columnHeader.getEditor(record)) && !(me.beforeEdit(context) === false || me.fireEvent('beforeedit', me, context) === false || context.cancel);
            if (isFieldEditable) {
                currentActiveEditor = me.getActiveEditor();
                newEditor = me.getEditor(record, columnHeader);
                if (currentActiveEditor) {
                    useCurrentActiveEditor = newEditor === currentActiveEditor;
                    me.completeEdit(!!newEditor);
                    if (me.editing) {
                        return false;
                    }
                }
            } else {
                return false;
            }
            me.context = context;
            context.view.scrollCellIntoView(context.view.getCell(record, columnHeader));
            if (newEditor) {
                if (useCurrentActiveEditor) {
                    newEditor.editing = false;
                    if (Ext.isIE) {
                        newEditor.selectSameEditor = true;
                    }
                }
                me.showEditor(newEditor, context, context.value);
                if (currentActiveEditor && !useCurrentActiveEditor) {
                    currentActiveEditor.hide();
                }
                return true;
            }
            return false;
        }
    }
    In this part of the snippet, they are calling parent to get the context.
    context = me.callParent(arguments);
    In development version, it returns constructor but in production version it just returns true.
    Because of this, I am getting "Uncaught TypeError: Cannot read property 'isVisible' of undefined" error.

    Please suggest on how to fix this issue.

    I am using Ext 5.1.1 running on Windows 7 OS.

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Does this only occur using RTL?

Similar Threads

  1. Replies: 1
    Last Post: 14 Jan 2013, 5:04 PM
  2. Replies: 6
    Last Post: 19 Nov 2012, 2:27 AM
  3. Replies: 1
    Last Post: 1 Sep 2012, 9:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •