Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. A question for Chris M

A question for Chris M

Scheduled Pinned Locked Moved The Lounge
question
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DRHuff
    wrote on last edited by
    #1

    Why does the insert smiley function always place the smiley at the end of the post instead of where the cursor is? I always write the post then want to insert the smileys where I want them and cutting and pasting them is a pain in the butt.:mad: (all right maybe not :mad: - more like:(( or :confused: ).:) Dave Huff 'tis a silly place!

    R N M 3 Replies Last reply
    0
    • D DRHuff

      Why does the insert smiley function always place the smiley at the end of the post instead of where the cursor is? I always write the post then want to insert the smileys where I want them and cutting and pasting them is a pain in the butt.:mad: (all right maybe not :mad: - more like:(( or :confused: ).:) Dave Huff 'tis a silly place!

      R Offline
      R Offline
      Roger Wright
      wrote on last edited by
      #2

      That's a good question, Dave! I've wondered the same...

      1 Reply Last reply
      0
      • D DRHuff

        Why does the insert smiley function always place the smiley at the end of the post instead of where the cursor is? I always write the post then want to insert the smileys where I want them and cutting and pasting them is a pain in the butt.:mad: (all right maybe not :mad: - more like:(( or :confused: ).:) Dave Huff 'tis a silly place!

        N Offline
        N Offline
        Nish Nishant
        wrote on last edited by
        #3

        I guess it is so because it might be impossible or extremely difficult to accomplish cursor based positioning using mere Javascript. Nish


        Check out last week's Code Project posting stats presentation from :- http://www.busterboy.org/codeproject/ Feel free to make your comments.

        1 Reply Last reply
        0
        • D DRHuff

          Why does the insert smiley function always place the smiley at the end of the post instead of where the cursor is? I always write the post then want to insert the smileys where I want them and cutting and pasting them is a pain in the butt.:mad: (all right maybe not :mad: - more like:(( or :confused: ).:) Dave Huff 'tis a silly place!

          M Offline
          M Offline
          mortrr
          wrote on last edited by
          #4

          The main problem is getting at the insertion point. The "minute" the cursor (focus) leaves the textarea, the insertionpoint is "lost". If you select some text in the textarea, you can replace that text, or fi insert tags around it (once you've asserted that the selection is actually in the textarea, and not somewhere else on the page), because the selection survives the click on the button. But if the cursor is just sitting there, doing it's thing, quietly blinking away, as it would if you want to insert a smiley somewhere, the browser looses the insertion point. - Mort

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups