Testing caretPos - نوشته شده در (1964 Views)
Average Member
SiSL
مطلب: 671
671
This is a caretPos testing for IE9

Edit: Hmm... Guess no way of testing that here... :(

Seems to be something wrong with "DOCTYPE html" and IE9 Documents Mode because of IE9. Hope to be fixed in IE9 RC at Feb 28th
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
نوشته شده در
Average Member
SiSL
مطلب: 671
671
I don't know how to describe... This is about editor, I think with html5 doctype and IE9 (I'm using, post-beta leak, not RC yet) (at least at my test build) for instance, "selecting a text range" like "text" word and pressing bold makes it like "[b]tex[/b]ext" not taking entire word or adding extras... (with Quirks mode like here, it works okay, so one side is related to DOCTYPE)

Not quite sure problem. It does not have problems in IE8 mode or any other browsers, so will watch out for real RC...
Other issue is sadly javascript "prompt" command asking a security question in IE9 on Prompt mode... Trying to find an alternative for that, but no thirdparty javascript halts and wait for responses like prompt...
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
Ok, I too have noticed issues with IE9 and the caretpos, just not had chance to play with the code to see if I can fix it. (you can try it's effect on snitz.reddiweb.com (it has doctype set)

The prompt issue is because it basically opens a window which is why security asks for confirmation, this is probably a setting in IE9 that needs adjusting.
The problem is that the more security features that they introduce to protect idiot users, the more annoying it gets for ordinary users who know what they are doing.
نوشته شده در
Average Member
SiSL
مطلب: 671
671
Thanks, will try asap...
Seems only way to find out is to wait for next release and see if it is fixed (if bug --which is most likely)
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
it could be that the javascript in the forum just needs updating
نوشته شده در
Average Member
SiSL
مطلب: 671
671
Originally posted by HuwR
it could be that the javascript in the forum just needs updating

might be, but then again, this happens not only on Snitz also Discuz!, vBulletin as far as I tried. Well, will look for solutions meanwhile...
Edit: OKAY, seems problem is selection moves exactly as count of "\r" characters which IE9 also supports \n only are carriages. Problem does not occur at first line, but following lines after enter/returns (which might mean IE9 returns character count wrong or misinterpreted also)
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
I did find a site where it worked ok, will try and remember the link and compare the code to ours
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
ok found it, demo here http://demo.vishalon.net/getset.htm (sets and returns correct caretpos in IE9

code here http://blog.vishalon.net/index.php/javascript-getting-and-setting-caret-position-in-textarea/
نوشته شده در
Average Member
SiSL
مطلب: 671
671
Any luck out there?

I will try to check when back home, if you did not already tested it yet on Snitz.
PS: It seems IE9 RC will be out today if not tonight (Feb 10th) so might check before doing anything else too...
نوشته شده در
Average Member
SiSL
مطلب: 671
671
IE9 RC is out and yes, as I expected, they have fixed that problem it seems :) So no need to modify any code unless if you think it would be improvement....
شما باید یک متن وارد کنید