Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8688265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:19:08+00:00 2026-06-12T23:19:08+00:00

I tested this code in Chrome and there seems to be a bug involving

  • 0

I tested this code in Chrome and there seems to be a bug involving the newlines. I am reaching the maxlength before I actually use all the characters.

var ta = document.getElementById('myText');

document.getElementById('max').innerHTML = ta.maxLength;

setInterval(function() {
    document.getElementById('count').innerHTML = ta.value.length;
}, 250);
<textarea id="myText" maxlength="200" style="width:70%;height:130px">
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s
Type more words here...
</textarea>

<div>
    Char Count <span id="count">0</span>/<span id="max">0</span>
</div>

How can I accurately get the char count of a textarea?

Update 1
I reported the bug to the Chromium team and it seems to be low priority.

Update 2
That bug was merged into another bug.

Update 3
The bug appears to be fixed!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:19:09+00:00Added an answer on June 12, 2026 at 11:19 pm

    Seems to be a WebKit bug (consider filing it) related to treating CR/LF pair as two characters instead of one. Since it’s usually noncritical if, say, 197 characters are allowed instead of 200, it’s fine to ignore this.

    But if you want, you can try to continuously save caret position, replace all \r\n to \n, and restore caret position in textarea while user is typing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I tested this code, it gave me java.lang.ArrayIndexOutOfBoundsException: 2 The code isn't finished
I had tested this code: http://support.microsoft.com/kb/316383 It works, but a Word application is opened
This works and is tested. PHP Code: $data_stats = json_decode($ret); $projected_points = $data_stats->body->player_stats->42550689->FPTS I
I have tested this servlet and it works well, except in Google Chrome it
Was just playing around with nodejs and chrome's console when I tested this: []
Im currently developing this site so none of the content on there is actually
Im currently developing this site so none of the content on there is actually
I use flexboxes in Google Chrome (only this browser has to be supported) to
Here is my code: jsFiddle . I've tested this in the latest versions of
While using this code, i can't get any results... Ext.define('Teste.view.Main', { extend: 'Ext.Container', initialize:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.