3.2.0

Modifying cell data freezes grid

Hi,

After we've moved the rest of the application from Prototype.observe() to jQuery().on() event registration, we have an issue in the grid: everything works fine until we type F2 and some text that modifies the cell's content.

After modifying the data, the grid no longer reacts to keyboard and mouse events, and the input control that AW has added to the cell remains in place
<input id="aw36-cell-1-3-box-edit" class="aw-item-text" autocomplete="off" value="Around the Horns" style="width: 100%;" type="text">


We probably have some conflicting JavaScript code somewhere else, we just don't know how to debug the issue.

Here is a video showing the behavior: https://youtu.be/wys08jYuIgo
Thierry Nivelet (FoxInCloud)
November 9,
Fixed

Exception in .onCellValidating() event handler that AW silently dismissed:
AW._endEdit = function() {
    if (AW._endEditFlag) {
      return false
    }
    AW._endEditFlag = true;
    try {
      if (originalText != obj.getControlProperty("text") && !AW._commitEdit()) {
        return false
      }
      if (raiseEvent("editEnding")) {
        return false
      }
      if (AW.$popup) {
        AW.$popup.hidePopup()
      }
      var e = obj.element().getElementsByTagName("INPUT")[0];
      if (AW.ie) {
        if (!AW.ms) {
          e.removeExpression("aw-value")
        }
        e.detachEvent("onselectstart", nobubble);
        e.detachEvent("oncontextmenu", nobubble);
        e.detachEvent("onpropertychange", oninput);
        e.detachEvent("onkeydown", onkeydown);
        e.detachEvent("onbeforedeactivate", onbeforedeactivate)
      } else {
        e.removeEventListener("contextmenu", nobubble, false);
        e.removeEventListener("selectstart", nobubble, false);
        e.removeEventListener("input", oninput, false);
        e.removeEventListener("keydown", onkeydown, false);
        obj.element().removeEventListener("mousedown", onmousedown, true)
      }
      e.parentNode.scrollLeft = 0;
      var text = obj.getControlProperty("text");
      if (originalNode) {
        originalNode.innerHTML = text;
        if (AW.ie) {
          e.parentNode.insertBefore(originalNode, e);
          removeElement(e)
        } else {
          e.parentNode.replaceChild(originalNode, e)
        }
        originalNode = null
      } else if (!obj.getContent("box/text").element()) {
        if (AW.ie) {
          e.parentNode.removeChild(e.previousSibling);
          e.insertAdjacentHTML("beforeBegin", text);
          removeElement(e)
        } else {
          e.parentNode.innerHTML = text
        }
      }
      e = null;
      obj.element().className = obj.element().className.replace(/ aw-edit-\w+/ig, "");
      if (obj.$owner) {
        obj.$owner.$edit = false
      }
      AW._edit = "";
      raiseEvent("editEnded");
      return true;
    } finally {
      AW._endEditFlag = false // * code ended up here -- EXCEPTION NOT PROCESSED  * //
    }
  }


Hopefully next version will handle these exceptions in user code which are otherwise very very difficult to debug.
Thierry Nivelet (FoxInCloud)
November 9,
maybe you could throw the exception; either user code or browser development tool will catch it.
Thierry Nivelet (FoxInCloud)
November 9,

This topic is archived.


Back to support forum