Announcement

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

    [bug] ListGrid filter doesn't focus on mouse click then filterByCell=true;

    Hi,
    version: SmartClient_v100p_2016-01-15_LGPL, also testsed 01-03, 2015-07-xx doesn't work too.
    browsers: chrome, firefox latests.

    test case:

    1) click on filter "a" (filter focused)
    2) click on filter "b" (nothing happens)
    3) click on filter "c" (nothing happens)
    4) click second time on filter "c" (focuses)

    if you remove "filterByCell: true" you'll get a correct behavior, then you click you'll be focused in item.

    Code:
        isc.ListGrid.create({
            width: 400,
            height: 200,
            autoDraw: true,
            showFilterEditor: true,
            filterByCell: true,
            fields: [
                {
                    name: 'a',
                },
                {
                    name: 'b'
                },
                {
                    name: 'c'
                }
            ]
        });

    fix: is pretty easy:
    patch to FormItem.focusInItem(..) method:

    Code:
                   // Fire a notification function centrally so we know a programmatic focus
                    // change has been triggered
                    isc.FormItem._aboutToFireNativeElementFocus(this);
                    isc.EventHandler._unconfirmedFocus = this;
    
                    element.focus(); // <- this focus() doesn't work because this action is inside  native  mouse down event handler.
                     //replace to:  setTimeout(function () { element.focus(); }, 0); // as it will be called outside event handler.
    more info: https://bugzilla.mozilla.org/show_bug.cgi?id=591890

    #2
    Hi, what is your priority for this issues? As it seems very easy to fix, but now we need manually alter your core files for this fix.

    Comment


      #3
      Hi, Isomorphic, is this issue was skipped or placed in lowest priority queue?

      Comment


        #4
        It hasn't been lost, but it likely won't be addressed for a while.

        Note your fix would have lots of problems in terms of how focus is managed and how we work around some very nasty bugs in IE, so we can't just apply that.

        Comment


          #5
          Thanks for reply. Understood, well it's not much problematic issue, clients can double click on filters and use these. But they are complaining it why single click is not sufficient as before. Don't know is this was affected only in newer releases of SmartClient or this issue was at the beggining.

          Comment


            #6
            We haven't looked over the full history yet to find out when this was introduced.

            But one thing to mention: you should be able to "patch" this with an addMethods() call that replaces the method you want to change, so that you don't have to modify core files per se. You will have to use obfuscated variable names of course.

            Comment


              #7
              Sure, but it's really dirty patch because the only way is to override FormItem.focusInItem and copy paste code from original method and patch over, and surely we'll forget to replace that code then do migration to next version, you know.. :)

              Comment


                #8
                Yes, it's a temporary measure, but it does allow you to install new versions of the JavaScript libraries without hand-modifying then, since the patch code is separate.

                Comment

                Working...
                X