The counter adds itself right after the text area but when inside the resizable textfield div with the grippy div it wedges itself between the two.

Here is a picture of what I mean:
https://img.skitch.com/20111205-c9nfqgmihqdrj1kkre515y8ks6.jpg

Comments

piotrsmykaj’s picture

in maxlength.js find this line:

$(this).after('<' + options.counterElement + ' id="' + $(this).attr('id') + '-' + options.css + '" class="' + options.css + '"></' + options.counterElement + '>');

and change to this one:

if ($(this).next('div.grippie').length) {
  $(this).next('div.grippie').after('<' + options.counterElement + ' id="' + $(this).attr('id') + '-' + options.css + '" class="' + options.css + '"></' + options.counterElement + '>');
} else {
  $(this).after('<' + options.counterElement + ' id="' + $(this).attr('id') + '-' + options.css + '" class="' + options.css + '"></' + options.counterElement + '>');
}
joelpittet’s picture

StatusFileSize
new718 bytes

Good call, here's a patch with out the duplicate after tag construction. Should it go outside the containing div or just after the grippy?

joelpittet’s picture

StatusFileSize
new937 bytes

here is a nicer git patch with a space fix for the indent.

fangel’s picture

Status: Active » Reviewed & tested by the community

The patch in #3 fixes this issue.

schnitzel’s picture

Status: Reviewed & tested by the community » Closed (fixed)

  • Commit 78de20c on 7.x-3.x, 8.x-1.x by Schnitzel:
    Issue #1361816, fixed by joelpittet "Position counter outside of...