Mozilla embraces textareas?
Fantastic news, if it works out. Marcus says a patch has been checked in to allow Mozilla to tell javascript what’s selected in a textarea. Not only is that good in terms of allowing bold/italic/link buttons to work cross-browser for things like weblog posting forms, it also gives me some hope for the other longterm textarea bugs.
Since I spend a huge part of my online time inside a textarea, the lack of any real developer interest in the textarea bugs has kept me from getting very excited about Mozilla. I understand that the people who are getting paid by Netscape need to work on things that Netscape needs (like, to have it work perfectly with things on netscape.com and yahoo.com and a couple of other big name, high traffic sites, and that’s all that matters), but since there are very few things that really annoy me about IE, Mozilla needs to not be really annoying (and things like stripping all the attributes off unescaped html posted in a textarea, so that links in a Blogger template turn into <a> are really annoying) before I’ll even give it enough of a trial to see if I’d like it better.
Anyone know if getSelection() works in Mozilla?
getSelection() works just fine in text and single line text inputs. It’s only in textareas where it fails (along with selectionStart and selectionEnd, which seem to currently give you the positions within a particular line). For selectionStart and selectionEnd, you want bug 88049; offhand I can’t remember the situation with getSelection() and textareas, whether there’s another bug, or selectionStart and selectionEnd will fix it, or it won’t ever be fixed. The whole thing has gone on so long now that I just can’t remember.
Hey Phil — back when you first talked about this on the forums, I bookmarked this link, and now I see that bug 88049 says its fixed on the bugzilla page… I can’t if tell that it really is working on the final release of Moz1.3 with similar code — it doesn’t do anything!
Anyhow, do you have any updates on this? I’m so NOT smart when it comes to reading bugzilla reports and knowing what they all mean!!!
Yeah, it is/should be working in 1.3, but I’ll have to dig around for an explanation and example howto – it went into Mozilla at a time when Phoenix builds were severely broken, so it wasn’t doing me much good, and by the time Phoenix got better I’d forgotten to get back to it. I know Julian Bond emailed me a link to his crossbrowser solution, which I probably failed to reply to and certainly failed to blog, but I hope I still have the email somewhere, like the ”should reply to this but I’m a loser” folder. I’ll look there when I get home tonight.
That’s exactly where it was: here’s Julian Bond’s wonderful and generously GPLed cross browser rich editing javascripted textarea editor solution.
Oh, man, I’m sorry about the multiple comments. I tried to post, and got a 500 error, and when I refreshed later, my comment still wasn’t there so I tried again. Doh!
No problem, you did exactly the right thing. If I wasn’t so lazy, I’d do a custom 500 page that said ”DreamHost hates Movable Type, so please just click the back button, add a sentance to your comment saying that you’re double-posting to get past a 500, and then keep posting until it goes through.”
http://wiki.oversite.ru/WikiEdit
It’s a textarea with autoindent and couple of hotkeys for wiki formatting.
But Mozilla scrolls vertical scrollbar up on every cnhange in textarea content made by script. :((
Textboxen in Mozilla
Ein wichtiges Feature, welches Mozilla bis jetzt fehlte, scheint auf dem Weg in die nächste Version zu sein. Phil Ringnalda