Announcement

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

    backspace not working in listgrid editor

    I have a project that has been using smart gwt for over 4 years now. It started on release 1.3. I'm currently on the LGPL Edition release 4.0(just download latest patch) and am using gwt 2.5.1(using eclipse as well). I'm using IE9 as the browser. My problem is that when I edit a cell in a listgrid and use the backspace key followed by a return, the backspace key is ignored. The return key simply causes the cell to reappear with the old value. I took the showcase listgrid example, created a simple project in eclipse and the editor worked just fine.
    I call basically the same class from my project entry point and the editor doesn't work. We had a problem with textbox as well, but were able to fix once I realized that the backspace key fires onkeyup instead of onkeychange. I can't use a similar fix for the ListGrid, so I'm trying to solve the real problem now.
    The one main difference between the showcase project and mine is that my themes are old. Would this cases the problem? Just looking for any hints at what might be causing the problem. I can include other project details. I just don't know what might be helpful.
    Another observation that I had about the simple showcase project vs mine, is that the showcase default behavior for a tab key was to move to next cell whereas my project defaulted to editor exit.
    Any help would be appreciated

    As an update, I've discovered that the following code was the root cause of my problem. Now I have to figure out how to make it work without impacting the listgrid editor.
    private native void initHelpSupportJS(MainWindow pl) /*-{
    $wnd.helpSupport = function (event) {
    if (!!pl.@com.telcordia.lfacs.anwebgui.client.framework.MainWindow::activeHelpPopUp){
    pl.@com.telcordia.lfacs.anwebgui.client.framework.MainWindow::helpSupportJS()();
    }
    if (!!pl.@com.telcordia.lfacs.anwebgui.client.framework.MainWindow::cancellableHelp) {
    if(!!event && !!event.preventDefault) {
    pl.@com.telcordia.lfacs.anwebgui.client.framework.MainWindow::helpSupportJS()();
    event.preventDefault();
    }
    }
    };
    $wnd.document.onclick = $wnd.helpSupport;
    $wnd.document.onkeydown = function(event) {
    event = event || $wnd.event;
    if (event.keyCode == 27) {
    $wnd.helpSupport(event);
    }
    };
    $wnd.defaultContextMenuHandler = $wnd.document.oncontextmenu;
    }-*/;
    Last edited by echaket; 20 Mar 2014, 12:22. Reason: more details

    #2
    We would not expect an old theme to cause an issue like this, it sounds like it's an issue with your event handlers.

    However, be sure to look at the docs for CSS3 mode in the Skinning overview. There's huge value in updating to a more recent theme.

    Comment


      #3
      Thanks for your input. Trying to reproduce problem for a post quickly lead to discover of the problem.
      We have a help subsystem to provide detailed help on most widgets on a screen when requested. To dismiss the help subsystem, we were trapping onkeydown(see the code in first post) at the window level looking for an escape key. The window level onkeydown handler was causing the backspace and tab key to not work in the listgrid editor. Perhaps the code could be fixed to not cause the problem, but I just removed the onkeydown code.
      This release focus was on upgrade to sgwt 4.0, so next release, we will look at upgrading themes.

      Comment

      Working...
      X