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

  • SmartClient 7.0rc2 patch: Doubled events on DynamicForms embedded in CanvasItems

    In SmartClient 7.0rc2, a bug exists whereby if a CanvasItem in a form contains another DynamicForm with a set of items in it, mouse events may be fired twice on the items on the inner form.

    The following patch fixes this behavior. (This has already been fixed in the 8.0 release).

    // Isomorphic SmartClient 7.0rc2 patch
    // Purpose: Avoid doubled mouse events on items embedded in DynamicForm
    // written into a CanvasItem, displayed in an outer DynamicForm.
    // Applies to SmartClient 7.0RC2 builds only
    if (window.isc) {
        if (isc.version.startsWith("7.0rc2/")) {
            if (isc.DynamicForm != null) {
                    handleMouseStillDown : function (event, eventInfo) {
                        var targetInfo = this.$ne(event),
                            item = ((targetInfo.overTitle || targetInfo.inactiveContext) ? null : targetInfo.item);
                        // avoid double delivery of events if there are nested DynamicForm elements all receiving
                        // this event via bubbling - only deliver to item if it's one of ours
                        if (item && item.containerWidget != this) return;
                        return this._origHMSD(event,eventInfo);
        } else {
            isc.logWarn("Patch code for SmartClient version 7.0rc2 included in this application. You are running SmartClient version " +
                isc.version + ". The patch code will have no effect in this application and should be removed.");