SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2011
    Location
    Canada,Montréal
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    contentEditable content going over page limits

    If you type a long text after 2 enter for exemple the text will go beyound the container limits.

    http://www.kmultim.com/exp/contentEd...ntEdit_01.html

    It should have the same behaviour as this page when it reach the content with limit: http://freshcode.co/plugins/jquery.c...able/demo.html

    tried to figure out why my text is overflowing beyound its limits .

    Plz help .

    Thanks.

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I'm testing it with Chrome and can't reproduce the effect. It seems to be working fine. What browser are you using?

    That said, I have experienced similar things with contentEditable in the past. I got around it by messing about with margins and changing the container size slightly.

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2011
    Location
    Canada,Montréal
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got the problem in IE7,IE8 , FF 7.0.1,. It seems to be worcking fine with chrome at least.

    I'll already tried that :I. I will look at chrome(15.0.874.106) to see whant it is doing differently.

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2011
    Location
    Canada,Montréal
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    lol Nevermind its working , if i typed ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff it would not work but everything is ok if i add a space .

    Anyway no word that long exist XD.

    Guess i was tired XD.

  5. #5
    SitePoint Member
    Join Date
    Nov 2010
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think setting the word-wrap property to break-word will protect against the problem. I did that in Firefox and the issue went away. I would imagine it would work the same in IE, though I haven't tested it. Granted, it is a bit of an edge case, but it's also a trivial fix.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •