Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid EditOnFocus Mouse cursor

    I am testing out a ListGrid on an IPad and have editOnFocus set to true. Right now it seems that when I click a cell, the text is highlighted, but I still have to click the cell again to get inside of the TextItem for editing. I was wondering if there was a way to automatically get a handle to the TextItem and programmatically place the cursor inside of it.

    My best attempt is the following, but the formItem is always coming back null:

    Code:
    grid.addEditorEnterHandler(new EditorEnterHandler()
    {
    
    @Override
    public void onEditorEnter(EditorEnterEvent event)
    {
    
            //formItem is always null
            FormItem formItem = grid.getEditFormItem(event.getColNum());
    
    }
    
    });


    Any help is appreciated. Thanks.

    #2
    There are some native limitations around programmatically shifting focus in iOS / Safari, so it may not be possible to make editOnFocus behave in the way you're after in this environment.

    Having said that, what we're seeing doesn't seem to exactly match your description. The logic to get at the edit form item from an editorEnter handler applied to a grid works in our testing (we're not seeing null returned).

    If you'd like us to investigate that specific issue further, we're happy to do so but we'll need to see a minimal test case that reproduces the problem. This should be a standalone entry point class with minimal required UI to reproduce the problem - most likely just a ListGrid definition with appropriate configuration which one of our developers can drop into a SmartGWT enabled page and run without modification.

    Also it would be worth letting us know details of your environment (which iOS version are you seeing this on, which SmartGWT build are you using)

    Regards
    Isomorphic Software

    Comment


      #3
      You are correct, I dug deeper into my example and found that I could in fact get a handle to the FormItem within onEditorEnter. That being said, I still wasn't able to get around the problem in iOS. I tested on an Android mobile phone and had no problems at all.


      Am I basically out of luck within iOS on this one?

      Comment

      Working...
      X