Announcement

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

    hideClickMask

    I noticed that in hideClickMask, there is a line of code which is trying to put the focus back on what I am assuming is the last recorded event culprit. This is causing issues in our product. I have a page in which there's a trigger on a select item. So sequence of actions: I change the value of this field, I send some server request and call showClickMask(). The server response comes back, I call hideClickMask. Then I scroll down my page and click on a button that generates a server request. I call showClickMask again, server response comes back, I call hideClickMask - but this time, I don't want it to go back to the gridlayout from the previous action since my current action is from down the page. Instead I see my page scrolling back up to the select item and putting focus on that. I assume it is because when showClickMask is called, it contains the wrong focusCanvas - Is there any way to disable this behavior? Is this intended at all?

    Below is the stacktrace of events - the problem is after the line 14:43:00.776:MUP6:WARN:Log:*********** GWT ACTION :selectContact

    Code:
     
    
    14:42:56.714:MUP2:WARN:Log:*********** GWT ACTION :popupConfirmation
    14:42:56.833:WARN:Log:****** backing up currentfocusitem
    14:42:56.833:INFO:clickMask:showing click mask, action: null, autoHide false , ID: cwBlockingUI, focusCanvas: [CwDynamicFormExtend ID:page$content$currentUI$generalInfoUI$$content$content$contentUI$generalInfoUI$content$GridLayout1]
    14:42:56.848:WARN:Log:*********** GENERATING UPDATE VALUES
    14:42:57.095:WARN:Log:*********** UPDATING VALUES
    14:42:57.115:WARN:Log:Auto Focus Value set as: false
    14:42:57.156:WARN:Log:**** forms loaded count =3
    14:42:57.189:WARN:Log:**** forms loaded count =3
    14:42:57.228:WARN:Log:**** forms loaded count =3
    14:42:57.232:WARN:Log:**** forms loaded count =2
    14:42:57.247:WARN:Log:**** forms loaded count =1
    14:42:57.281:WARN:Log:**** forms loaded count =3
    14:42:57.284:WARN:Log:**** forms loaded count =2
    14:42:57.291:WARN:Log:**** forms loaded count =1
    14:42:57.397:WARN:Log:**** forms loaded count =0
    14:42:57.397:WARN:Log:Auto Focus Value re-set as: true
    14:42:57.398:INFO:clickMask:hideClickMask called with ID: cwBlockingUI
    14:42:57.398:INFO:clickMask:hiding clickMask ID: cwBlockingUI[autoHide:false], all masks hidden
    14:42:57.402:INFO:clickMask:focusing in [CwDynamicFormExtend ID:page$content$currentUI$generalInfoUI$$content$content$contentUI$generalInfoUI$content$GridLayout1] on clickMask hide with current focusCanvas: null
    14:42:57.405:WARN:Log:****  TRYING TO FOCUS on [CwDynamicFormExtend ID:page$content$currentUI$generalInfoUI$$content$content$contentUI$generalInfoUI$content$GridLayout1]
    14:43:00.776:MUP6:WARN:Log:*********** GWT ACTION :selectContact
    14:43:00.781:click7:WARN:Log:****** backing up currentfocusitem
    14:43:00.782:click7:INFO:clickMask:showing click mask, action: null, autoHide false , ID: cwBlockingUI, focusCanvas: [CwDynamicFormExtend ID:page$content$currentUI$generalInfoUI$$content$content$contentUI$generalInfoUI$content$GridLayout1]
    14:43:00.795:click7:WARN:Log:*********** GENERATING UPDATE VALUES
    14:43:01.067:MMV2:WARN:Log:*********** UPDATING VALUES
    14:43:01.223:MMV2:WARN:Log:**** forms loaded count =1
    14:43:01.225:MMV2:INFO:clickMask:hideClickMask called with ID: cwBlockingUI
    14:43:01.225:MMV2:INFO:clickMask:hiding clickMask ID: cwBlockingUI[autoHide:false], all masks hidden
    14:43:01.228:MMV2:INFO:clickMask:focusing in [CwDynamicFormExtend ID:page$content$currentUI$generalInfoUI$$content$content$contentUI$generalInfoUI$content$GridLayout1] on clickMask hide with current focusCanvas: null
    14:43:01.231:MMV2:WARN:Log:****  TRYING TO FOCUS on [CwDynamicFormExtend ID:page$content$currentUI$generalInfoUI$$content$content$contentUI$generalInfoUI$content$GridLayout1]
    14:43:01.322:WARN:Log:**** forms loaded count =3
    14:43:01.325:WARN:Log:**** forms loaded count =3
    14:43:01.329:WARN:Log:**** forms loaded count =3
    14:43:01.496:WARN:Log:**** forms loaded count =3
    14:43:01.503:INFO:clickMask:showing click mask, action: page$dialog$$dialog$dialog.flash(), autoHide false , ID: page$dialog$$dialog$dialog, focusCanvas: [CwDynamicFormExtend ID:page$content$currentUI$generalInfoUI$$content$content$contentUI$generalInfoUI$content$GridLayout1]
    14:43:01.666:DEBUG:clickMask:Added unmasked targets:page$dialog$$dialog$dialog_header [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:01.740:DEBUG:clickMask:Added unmasked targets:isc_Canvas_1,page$dialog$$dialog$dialog_headerLabel [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:01.741:DEBUG:clickMask:Added unmasked targets:page$dialog$$dialog$dialog_closeButton [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:01.747:DEBUG:clickMask:Added unmasked targets:page$dialog$$dialog$dialog_body,page$dialog$$dialog$vLayout,page$dialog$$dialog$content,page$dialog$content$$dialog$content$TopVerticalStackLayout,page$dialog$content$$dialog$content$content,page$dialog$content$contactFinderUI$$dialog$content$content$topStack,isc_ImgSectionHeader_2,page$dialog$content$contactFinderUI$$dialog$content$content$topSectionfinderHeader,page$dialog$content$contactFinderUI$$dialog$content$content$GridLayout,page$dialog$content$contactFinderUI$$dialog$content$content$resStack,isc_ImgSectionHeader_3,page$dialog$content$contactFinderUI$$dialog$content$content$resSectionresultFrame,page$dialog$content$contactFinderUI$$dialog$content$content$resultFrame,page$dialog$content$contactFinderUI$$dialog$content$content$resultFrame$table,page$dialog$content$contactFinderUI$$dialog$content$content$resultFrame$contactOnlyFinderResultTable,page$dialog$content$contactFinderUI$$dialog$content$content$Button$gridWrap,page$dialog$content$contactFinderUI$$dialog$content$content$Button,isc_EdgedCanvas_17,page$dialog$$dialog$statusMessage,page$dialog$$dialog$mLayout,page$dialog$$dialog$contentMenu [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:01.856:DEBUG:clickMask:Added unmasked targets:page$dialog$content$contactFinderUI$$dialog$content$content$resultFrame$contactOnlyFinderResultTablefilterEditor [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:01.857:DEBUG:clickMask:Added unmasked targets:page$dialog$content$contactFinderUI$$dialog$content$content$resultFrame$contactOnlyFinderResultTable_body [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:01.864:DEBUG:clickMask:Added unmasked targets:page$dialog$content$contactFinderUI$$dialog$content$content$resultFrame$contactOnlyFinderResultTablefilterEditor_body [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:01.865:DEBUG:clickMask:Added unmasked targets:isc_Button_0 [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:01.931:DEBUG:clickMask:Added unmasked targets:isc_ImgSectionHeader_2_background_label [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:01.931:DEBUG:clickMask:Added unmasked targets:isc_ImgSectionHeader_2_background,isc_ImgSectionHeader_2_background_label [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:01.932:DEBUG:clickMask:Added unmasked targets:isc_ImgSectionHeader_2_controlsLayout,page$dialog$content$contactFinderUI$$dialog$content$content$pref [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:02.009:WARN:Log:**** forms loaded count =2
    14:43:02.145:WARN:Log:**** forms loaded count =1
    14:43:02.145:WARN:Log:**** forms loaded count =0
    14:43:02.145:WARN:Log:****SUPPOSED TO CALL FOCUS ITEM HERE
    14:43:02.145:WARN:Log:Auto Focus Value re-set as: true
    14:43:02.375:DEBUG:clickMask:Added unmasked targets:page$dialog$$dialog$dialog_body_hscroll_thumb_label [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:02.375:DEBUG:clickMask:Added unmasked targets:page$dialog$$dialog$dialog_body_hscroll_thumb,page$dialog$$dialog$dialog_body_hscroll_thumb_label [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:02.376:DEBUG:clickMask:Added unmasked targets:page$dialog$$dialog$dialog_body_hscroll,page$dialog$$dialog$dialog_body_hscroll_thumb,page$dialog$$dialog$dialog_body_hscroll_thumb_label [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:02.376:DEBUG:clickMask:Added unmasked targets:page$dialog$$dialog$dialog_body_hscroll,page$dialog$$dialog$dialog_body_hscroll_thumb,page$dialog$$dialog$dialog_body_hscroll_thumb_label [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:02.395:DEBUG:clickMask:Added unmasked targets:page$dialog$$dialog$dialog_body_vscroll_thumb_label [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:02.396:DEBUG:clickMask:Added unmasked targets:page$dialog$$dialog$dialog_body_vscroll_thumb,page$dialog$$dialog$dialog_body_vscroll_thumb_label [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:02.396:DEBUG:clickMask:Added unmasked targets:page$dialog$$dialog$dialog_body_vscroll,page$dialog$$dialog$dialog_body_vscroll_thumb,page$dialog$$dialog$dialog_body_vscroll_thumb_label [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    14:43:02.396:DEBUG:clickMask:Added unmasked targets:page$dialog$$dialog$dialog_body_vscroll,page$dialog$$dialog$dialog_body_vscroll_thumb,page$dialog$$dialog$dialog_body_vscroll_thumb_label [+ decendants] to clickMask with ID: page$dialog$$dialog$dialog
    I should probably also note that the code written to call showClickMask is:

    isc.EH.showClickMask(null,"hard",null,"cwBlockingUI");
    Last edited by acarur01; 24 Jan 2012, 12:01.

    #2
    It's hard to fully grasp the sequence of actions from the logging info you're posting here but the expected / intended behavior is:

    - when a click mask is shown it remembers what component has focus
    - when hidden it resets focus back to that component, unless focus has shifted to another component since the mask was shown
    - when a new click mask is shown it should do the same thing - remember the current focus canvas (it has no idea about what previous click-masks remembered as the focus target), and attempt to reset to it when hidden, unless focus has validly gone somewhere else while the mask was up.

    If this isn't what you're seeing, we'd need to see a standalone test case to tell if this is actually a framework bug or not. Certainly we're not aware of bugs in this area (though you should be aware that focus/blur are asynchronous in IE meaning if you've called "focus()" on some component and then show the clickMask in the same thread, the onfocus handler may not have yet fired so the clickMask may fail to pick up the new focus target).

    We do have internal APIs for manipulating the "masked focus target" which we could expose to you at a pinch, but you should be aware that these will be unsupported. We can't guarantee they won't change over time (the best we could offer you would be to notify you via this thread if they do change).

    Comment


      #3
      What I'm seeing is that this button that I am clicking on which calls showClickMask a second time is not being registered as a focusCanvas. It could very well be a timing issue on our part. I will turn on scrolling and nativeFocus to see exactly what is going on when I click the button

      Comment


        #4
        Just to give an update on what I've found - we have logic to set the focus back on the last focused item before the server action - which in this case is the select field - my guess is when I click the button, it has not fully completed the selection - when I call getFocusCanvas() just before I send the click action to the server, the canvas I get is that of the select field's dynamic form and not the button. I've gotten it to work by forcing the focus back on the clicked element when the click action is invoked.

        Comment


          #5
          Hi Ariane,
          From your description it's not clear whether there's a framework bug - sounds more like an application-specific timing issue with your focus manipulations.
          In any case - good to hear you have a working solution. If you find the problem does persist for some reason and you'd like us to look further, if you can put a test case together for us we'll be happy to take a look

          Regards
          Isomorphic Software

          Comment

          Working...
          X