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 7158343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:02:59+00:00 2026-05-28T13:02:59+00:00

Interesting one, this. I have the following JS code, which I’m displaying in a

  • 0

Interesting one, this. I have the following JS code, which I’m displaying in a textarea.

var drinks = ['coffee', 'tea', 'Ribena', 'Vimto', 'ginger beer', 'hot chocolate'];

Where wrapping is required, IE breaks BEFORE the first square bracket (i.e. the start of the array, but the actual JS code isn’t important here), whereas other browsers break WITHIN the square brackets.

The latter seems correct, since there are spaces (i.e. breakable points) within the square brackets.

There is no funky word-wrap or white-space CSS going on. Is there anything I can do about this?

  • 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-05-28T13:03:01+00:00Added an answer on May 28, 2026 at 1:03 pm

    There are several characters -()[]{}«»%°·/!? that Internet Explorer automatically interprets as a line break. You have kind of a special situation in that you are trying to make this work inside of a textarea since you can’t render HTML within the tag.

    In theory, you could do something like:

    <textarea><nobr>var drinks = ['coffee', 'tea', 'Ribena'];</nobr></textarea>
    

    and IE would not automatically break at characters such as the [ as noted by your example. Except, you obviously can’t use the html tag inside of a textarea so this just isn’t possible.

    As an alternative, if you are seeking one, might you try using a scrollable div instead of a text area for this situation?

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

Sidebar

Related Questions

Alright, this one's interesting. I have a solution, but I don't like it. The
Problem One friend suggested an interesting problem. Given the following code: public class OuterClass
I'm generally not a fan of microbenchmarks. But this one has a very interesting
This is one of the more interesting things I've seen in iPhone development. The
Interesting one here. I have an ASP.NET 1.1 project that contains a web service
I have one interesting problem. I must parse mail body (regular expression), get some
I have 2 script as following: First one: SELECT [Fm].[Id], [Sdp].[FirstName], [Sdp].[LastName], [Sdp].[SSN], [Sdp].[StoreName],
So I have a master page in MVC that has the following code in
I have the following thread which simply prints a dot every 200ms: public class
I have code of the following form: class Test { private final A t;

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.