Reply to comment

Resizable Textarea im IE7 verschoben

Tagged:

textarea.js is incompatible with IE: http://drupal.org/node/101305

Patch für Drupal 4.7:

&#10;Index: misc/textarea.js&#10;===================================================================&#10;RCS file: /cvs/drupal/drupal/misc/textarea.js,v&#10;retrieving revision 1.9&#10;diff -u -u -F^f -r1.9 textarea.js&#10;--- misc/textarea.js    14 Apr 2006 13:48:56 -0000    1.9&#10;+++ misc/textarea.js    4 Dec 2006 18:57:16 -0000&#10;@@ -47,9 +47,13 @@ function textArea(element) {&#10;   <a href="http://this.element.style.width">this.element.style.width</a> = &#039;100%&#039;;&#10;   <a href="http://this.element.style.height">this.element.style.height</a> = <a href="http://this.dimensions.height">this.dimensions.height</a> +&#039;px&#039;;&#10; &#10;-  // Wrap textarea&#10;+  // Wrap textarea, working around an IE margin bug.&#10;+  // (see <a href="http://jaspan.com/ie-inherited-margin-bug-form-elements-and-haslayout)&#10">http://jaspan.com/ie-inherited-margin-bug-form-elements-and-haslayout)&#10</a>;   removeNode(this.element);&#10;-  this.wrapper.insertBefore(this.element, this.grippie);&#10;+  this.iewrap = document.createElement(&#039;span&#039;);&#10;+  <a href="http://this.iewrap.className">this.iewrap.className</a> = &#039;resizable-textarea-ie-hack&#039;; // no CSS needed&#10;+  this.iewrap.appendChild(this.element);&#10;+  this.wrapper.insertBefore(this.iewrap, this.grippie);&#10; &#10;   // Measure difference between desired and actual textarea dimensions to account for padding/borders&#10;   this.widthOffset = dimensions(this.wrapper).width - this.dimensions.width;&#10;

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Insert Google Map macro.

More information about formatting options