Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 335779
Collapse All | Expand All

(-)js/qx/ui/form/TextField.js (-1 / +16 lines)
Lines 60-66 Link Here
60
    // [rst] Catch backspace in readonly text fields to prevent browser default
60
    // [rst] Catch backspace in readonly text fields to prevent browser default
61
    // action (which commonly triggers a history step back)
61
    // action (which commonly triggers a history step back)
62
    // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=178320
62
    // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=178320
63
    this.addEventListener("keydown", this._onkeydown);
63
    this.addEventListener( "keydown", this._onkeydown );
64
    // [if] Catch arrow keys in enabled text fields to prevent their propagation to the parent
65
    // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=335779
66
    this.addEventListener( "keypress", this._onkeypress );
64
  },
67
  },
65
68
66
69
Lines 972-977 Link Here
972
      }
975
      }
973
    },
976
    },
974
977
978
    // [if] Catch arrow keys in enabled text fields to prevent their propagation to the parent
979
    // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=335779
980
    _onkeypress : function( e ) {
981
      if( (  e.getKeyIdentifier() == "Left"
982
          || e.getKeyIdentifier() == "Right"
983
          || e.getKeyIdentifier() == "Up"
984
          || e.getKeyIdentifier() == "Down" )
985
          && this.getEnabled() ) {
986
        e.stopPropagation();
987
      }
988
    },
989
975
    /*
990
    /*
976
    ---------------------------------------------------------------------------
991
    ---------------------------------------------------------------------------
977
      CROSS-BROWSER SELECTION HANDLING
992
      CROSS-BROWSER SELECTION HANDLING

Return to bug 335779