Drupal Association Individual MemberZend Certified Engineer Details

Auf Kommentar antworten

Resizable Textarea im IE7 verschoben

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

Patch für Drupal 4.7:

Index: misc/textarea.js

=======================================================
RCS file: /cvs/drupal/drupal/misc/textarea.js,v retrieving revision 1.9 diff -u -u -F^f -r1.9 textarea.js --- misc/textarea.js 14 Apr 2006 13:48:56 -0000 1.9

+++ misc/textarea.js 4 Dec 2006 18:57:16 -0000

@@ -47,9 +47,13 @@ function textArea(element) {

   this.element.style.width = '100%';
   this.element.style.height = this.dimensions.height +'px';
 
- // Wrap textarea

+ // Wrap textarea, working around an IE margin bug.

+ // (see http://jaspan.com/ie-inherited-margin-bug-form-elements-and-haslayout)

   removeNode(this.element);
- this.wrapper.insertBefore(this.element, this.grippie);

+ this.iewrap = document.createElement('span');

+ this.iewrap.className = 'resizable-textarea-ie-hack'; // no CSS needed

+ this.iewrap.appendChild(this.element);

+ this.wrapper.insertBefore(this.iewrap, this.grippie);

 
   // Measure difference between desired and actual textarea dimensions to account for padding/borders
   this.widthOffset = dimensions(this.wrapper).width - this.dimensions.width;

Antworten

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.
  • Insert Google Map macro.

Weitere Informationen über Formatierungsoptionen