Skip to Navigation | Skip to Content



Archive for the ‘opera’ Category

Dragonfly Debugger is the new Hawtness | May 7th, 2008

Opera has released an alpha version of their answer to Firebug – DragonFly. Its a JavaScript/CSS/DOM/HTML/General debugger for your web apps. It has a lot of the features of Firebug and Drosera, but with some special sauce too.

The really cool thing about this tool is it assists with device-development too. Opera is the browser of choice on a lot of mobile devices, Nintendo Wii, and such. Firefly – er, DragonFly - helps us debug pages running natively ON those devices, which is an outstanding feature. I haven’t had occasion to try it out yet but will soon.

Posted in ajax, opera, resources, web development | No Comments » | Add to Delicious | Digg It

Text Selection and Caret Position (IE/Firefox) | January 24th, 2008

Update 2: I posted another fix to the file I posted yesterday to correct an issue with text objects inside iFrames.

Update: I posted a fix to the file I posted yesterday to correct an issue with weird characters appearing at the end of textareas in IE.

Wow. I was so surprised today to find out how hard it is to reliably get the current text selection and caret position through JavaScript in different browsers. Ok, Firefox is easy. Internet Explorer is profoundly hard and weird. I looked at a lot of different methods including (but not limited to):

.. and of course the official docs, which suck:

None of these methods worked for me, for various reasons. The biggest issue is IE6/7 differences in the techniques, and also differences with how TEXTAREA’s versus INPUT fields work.

I have tested this script and it appears to be working on:

  • input text fields
  • textareas

on..

  • IE6
  • IE7
  • Firefox 2
  • Safari (PC 3)

It probably works on Opera too.
For my full script go here:

getcaretselection3.js

Posted in firefox, ie6, ie7, opera, safari | 9 Comments » | Add to Delicious | Digg It


Search Posts

You are currently browsing the archives for the Uncategorized category.

Archives

Categories

LinkedIn Profile

  • My Profile


My ideal work culture:
[See my summary] [What's yours?]