Oooops, After reading T.J's message (http://groups.google.com/group/prototype- scriptaculous/t/38c587197bfb14e7), I noticed that what I called "readOnly attribute" was in fact "readOnly property".
Sorry for that, and thanks T.J. for teaching me this concept :o) Eric On Oct 21, 2:01 pm, Eric <[email protected]> wrote: > Hi JoJo, > > This is more a work around than a fix, but you may try to: > - set the textarea's readonly attribute to true instead of disable it > (that would prevent the user to type anything while letting the cursor > in place) > - add a custom class name to the textarea that make it look disabled > (setting a gray background and dark gray text should do it) > > Instead of enabling it again, you just set readOnly to false and > remove the custom class name. > > HTH. > Eric > > On Oct 20, 11:28 pm, JoJo <[email protected]> wrote: > > > I found out what was causing the issue. In my AJAX to add the comment > > I had: > > > onCreate: function() { > > $("foo').disable();} > > > onComplete: function() { > > $('foo').enable(); > > > } > > > I commented out these two and the blinking cursor came back. Ideally, > > the textarea should be disabled when the AJAX is processing... > > > On Oct 20, 1:36 pm, JoJo <[email protected]> wrote: > > > > activate() did not fix it. > > > > On Oct 19, 11:08 pm, Walter Lee Davis <[email protected]> wrote: > > > > > Try activate in place of focus, and see if that works for you. Just > > > > checking -- you do have Prototype in your page, right? > > > > > Walter > > > > > On Oct 19, 2010, at 9:59 PM, JoJo wrote: > > > > > > I'm creating a standard chat system. When the user hits the Enter key > > > > > in the textarea, I send her comment to the server. Then I clear her > > > > > message so she can begin typing a new one. The cursor blinker > > > > > disappears when I do this clear. It's better for usability if the > > > > > blinking remains. How do I put it back? > > > > > > <textarea id="foo"></textarea> > > > > > > $('foo').clear(); > > > > > // at this point the blinking cursor is gone > > > > > $('foo').focus(); > > > > > // focusing does not put the blinker back > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > > > Groups "Prototype & script.aculo.us" group. > > > > > To post to this group, send email to > > > > > [email protected] > > > > > . > > > > > To unsubscribe from this group, send email to > > > > > [email protected] > > > > > . > > > > > For more options, visit this group > > > > > athttp://groups.google.com/group/prototype-scriptaculous?hl=en > > > > > . > > -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
