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 361051 | Differences between
and this patch

Collapse All | Expand All

(-)js/org/eclipse/rwt/widgets/Text.js (+6 lines)
Lines 52-57 Link Here
52
      // Fix for bug 306354
52
      // Fix for bug 306354
53
      this._inputElement.style.paddingRight = "1px";
53
      this._inputElement.style.paddingRight = "1px";
54
    },
54
    },
55
    
56
    _webkitMultilineFix : function() {
57
      if( this._inputTag !== "textarea" ) {
58
        this.base( arguments );
59
      }
60
    },
55
61
56
    _applyWrap : function( value, oldValue ) {
62
    _applyWrap : function( value, oldValue ) {
57
      if( this._inputTag == "textarea" ) {
63
      if( this._inputTag == "textarea" ) {
(-)js/qx/ui/form/TextField.js (+15 lines)
Lines 358-369 Link Here
358
        } else {
358
        } else {
359
          inp.addEventListener("input", this.__oninput, false);
359
          inp.addEventListener("input", this.__oninput, false);
360
        }
360
        }
361
        
362
        if (qx.core.Variant.isSet( "qx.client", "webkit" ) ) {
363
          this._webkitMultilineFix();
364
        }
361
365
362
        // TODO [tb] : write test:
366
        // TODO [tb] : write test:
363
        this._getTargetNode().appendChild( inp );
367
        this._getTargetNode().appendChild( inp );
364
      }
368
      }
365
    },
369
    },
370
    
371
    _webkitMultilineFix : function(){
372
      this.addEventListener( "keydown", this._preventEnter, this );
373
      this.addEventListener( "keypress", this._preventEnter, this );
374
      this.addEventListener( "keyup", this._preventEnter, this );
375
    },
366
376
377
    _preventEnter : function( event ) {
378
      if( event.getKeyIdentifier() === "Enter" ) {
379
        event.preventDefault();
380
      }
381
    },
367
382
368
    /**
383
    /**
369
     * We could not use width/height = 100% because the outer elements
384
     * We could not use width/height = 100% because the outer elements

Return to bug 361051