Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: Adam112 on May 08, 2009, 09:46:18 PM

Title: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Adam112 on May 08, 2009, 09:46:18 PM
Hi, first-time poster here -- I'm part of a SMF 1.1.8 based forum elsewhere.

I've found that on that forum, if I type a long enough post (roughly 2-3 lines past where the text box normally ends), the text box begins to act up on me.  If I type anything beyond that point, the viewed part of the text seems to "hop" up a few lines from where I am typing and I can only briefly see the line I am typing, at the very bottom of the box, for the few milliseconds during which time I press the letter key(s).  This is very annoying when writing a post, editing a post, and selecting text in the box to cut or copy.

The box will even hop up a couple of lines if I move my cursor out of the box and over one of the various formatting buttons above it.

This started maybe a week or two ago, and even when I downloaded the new I.E. 8 (8.0.6001.18702 to be exact) it didn't solve the problem.  I'm thinking that maybe the forum admins changed something regarding the text box but I'm not sure if they did.  (It's even happening when I go farther down in the text boxes here.  Gah.)

Is this some compatibility problem between IE and SMF code?  Any insight you might have would be a big help.

Thanks,
Title: Re: Problems with text box when posting
Post by: karlbenson on May 09, 2009, 07:40:10 AM
We have an existing bug report on this
http://dev.simplemachines.org/mantis/view.php?id=3354

However recent discoveries by both myself and smf user Riker suggest that this is a known IE 8 bug.

Title: [3354] Message text area "jumps"
Post by: Bilbo1960 on June 08, 2009, 06:27:12 AM
I have recently installed SM forum on my site. I'm using IE8, Windows XP and the default theme.

When I type in long texts or paste in texts in the topic text area (eg. inserting quoted previous poster above text) the text area starts to "jump" and the last line disappears below the bottom of the text area, which makes it difficult to continue typing in text.

Is this a bug or is there a simple solution to this?

By the way, it happens in this text area too if I paste more text in above! So it's not my setup at my site.

Can you help?
Title: Re: Message text area "jumps"
Post by: karlbenson on June 08, 2009, 02:09:46 PM
This is an IE8 bug.

Many software scripts including smf, phpbb and many others have been scrambling to find a hack/fix until Microsoft patches it.

We have an existing bug report on our tracker.
For 2.x I posted two possible fixes (in the last comment)
http://dev.simplemachines.org/mantis/view.php?id=3354
Title: Re: [3354] Message text area "jumps"
Post by: scottb on June 15, 2009, 09:48:30 AM
Yeah, in IE8 at the top to the right of the address bar you'll see an icon of a torn in half piece of paper. Click on that which will turn on compatability mode and should solve that issue.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: karlbenson on June 18, 2009, 05:53:12 PM
* merged identical bug report topics together *
Title: IE8 and rev. 1.1.9 incompatible?
Post by: Gent on June 21, 2009, 06:52:39 AM
Microsoft is now upgrading their users to Internet Explorer rev. 8 as part of the automatic upgrades.

When typing new messages that are longer than the number of lines in the input box (that's when the scroll bar appears) the cursor and text nervously start to jump up and down.

I've had this reported by a few of my forum members a few weeks ago. Now that I upgraded to IE8 I have the same problem. So I don't know if this is a bug in the Simple Machines software or in IE8. Althouh the problem does not appear on other blog sites.

Note: Even when typing this message I encountered the problem
Title: Re: IE8 and rev. 1.1.9 incompatible?
Post by: Aleksi "Lex" Kilpinen on June 21, 2009, 06:54:40 AM
IE8 does that - But if you switch to compatibility mode ( the "IE7" mode ) it should not do it anymore.



[3354][IE8] Problems with text box scroller/cursor moving. (http://www.simplemachines.org/community/index.php?topic=309186.0)
Title: Re: IE8 and rev. 1.1.9 incompatible?
Post by: Gent on June 21, 2009, 07:26:43 AM
That is correct. It works fine in compatibility mode. I discovered that after I posted here. (Google is your best friend)

I just wanted to report the bug as at some point we'll have to be compatible with what Microsoft dicates, I guess.
Title: Re: Message text area "jumps"
Post by: Daniel Hofverberg on June 22, 2009, 03:56:06 AM
Quote from: regularexpression on June 08, 2009, 02:09:46 PM
We have an existing bug report on our tracker.
For 2.x I posted two possible fixes (in the last comment)
http://dev.simplemachines.org/mantis/view.php?id=3354
Are there any usable workarounds for SMF 1.1.9 for this problem? The code given in the bug tracker is not directly usable in 1.1.9.
Title: ERROR with IE 8
Post by: cc4digital on July 02, 2009, 06:50:21 PM
If you are in new topic and your currsor reaches the bottom of the input box there is an issue of scrolling.  The scroll bar trys to stay at the top.  Thus as you type-- it jumps to the top and you can no longer see what you are typing.

If you put IE into compatability mode it work fine.

chuck
Title: Re: ERROR with IE 8
Post by: karlbenson on July 03, 2009, 07:18:27 PM
This is an IE8 Bug.  However we're hoping to temporarily patch it until MS fixes it.
(this doesn't just affect smf but any html page with any textareas which have a percentage width set.

(We already have an open bug report on this http://www.simplemachines.org/community/index.php?topic=309186.0 )
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: karlbenson on July 04, 2009, 08:37:57 AM
* merged duplicate bug report topics.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: marcbo on July 07, 2009, 03:18:08 AM
Quote from: Daniel Hofverberg on June 22, 2009, 03:56:06 AM
Quote from: regularexpression on June 08, 2009, 02:09:46 PM
We have an existing bug report on our tracker.
For 2.x I posted two possible fixes (in the last comment)
http://dev.simplemachines.org/mantis/view.php?id=3354
Are there any usable workarounds for SMF 1.1.9 for this problem? The code given in the bug tracker is not directly usable in 1.1.9.

I cannot ask thousands of forummembers to turn on IE compatability mode
Any results yet? Did someone find a workaround for smf 1.1.x?
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: karlbenson on July 08, 2009, 01:19:26 PM
We have not yet adopted any solution.

Even with the examples within the bugreport, they only convered the standard reply window, not quick reply, nor quick edit.
(and any other text areas with percentage based widths set)
Title: IE 8
Post by: shires82 on July 14, 2009, 12:19:12 PM
There are issues with the forum on IE8. When replying to a post the text input area refuses to scroll after a certain number of carraige returns. Although you are still able to type you cannot see the output. You can use the arrow keys to move down to view the text however as soon as you start typing the text displayed is from the starting paragraph (i.e. cannot see what you type / box focus moves)
Title: Re: IE 8
Post by: karlbenson on July 14, 2009, 01:32:12 PM
This is an IE8 Bug.

We have a bug for it on our bugtracker to see whether we can potentially provide a temporary workaround fix until Microsoft patches it.

The easiest solution at the moment is to switch to IE7 (Emulated mode)
Title: Re: IE 8
Post by: Vincent Volmer on July 15, 2009, 10:20:01 AM
Quote from: regularexpression on July 14, 2009, 01:32:12 PM
This is an IE8 Bug.

We have a bug for it on our bugtracker to see whether we can potentially provide a temporary workaround fix until Microsoft patches it.

The easiest solution at the moment is to switch to IE7 (Emulated mode)

Sorry to ask... but is this fixed with SMF2.0RC1.2?

Thanks, Vincent
Title: Re: IE 8
Post by: karlbenson on July 15, 2009, 02:04:14 PM
No.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Kays on July 17, 2009, 03:00:58 PM
If it's bothersome, a quick and dirty way to force IE8 to emulate IE7 is to add this line to the <head> in Index.template.php of the theme you are using.

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: karlbenson on July 18, 2009, 01:59:48 PM
* merged duplicate bug report topics.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Anglis on July 20, 2009, 05:38:33 PM
Quote from: scottb on June 15, 2009, 09:48:30 AM
Yeah, in IE8 at the top to the right of the address bar you'll see an icon of a torn in half piece of paper. Click on that which will turn on compatability mode and should solve that issue.
nice one dude. ;)
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Skuggan on July 26, 2009, 10:29:24 AM
Quote from: Kays on July 17, 2009, 03:00:58 PM
If it's bothersome, a quick and dirty way to force IE8 to emulate IE7 is to add this line to the <head> in Index.template.php of the theme you are using.

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

Thanks, I'm using that one on my website now, but I hope MS will fix this, checked through their bugportal and found reports on this bug that came in to them in March 2009, and its still not fixed. So I wont be waiting for a fix from them.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: karlbenson on July 27, 2009, 01:39:00 PM
Hopefully ms will fix it.

I'm still hopeful we can do a temp fix. However I would not recommend using the emulate ie7 tag because although it will resolve this bug, you'll end up with other ie7 bugs. :P
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: kopchev on July 29, 2009, 01:34:56 PM
The question is which IE is buggier? I bet one buck ot IE8. I'm planning to put somewhere in my website a warning not use IE8, but FF and Opera instead.
Title: Display bug on long posts in IE 8.06 SMF 2 RC1-1
Post by: Kroy on August 25, 2009, 03:57:41 PM
IE 8.0.6 
SMF 2.0 RC 1-1

Problem description: post entry beyond height of post input box creates nasty cursor tracking issues. The post jumps back and forth. It seems to related to line width or total char count. Just hitting return a few times to create extra lines doesn't create this effect.

Unable to reproduce on Firefox or Chrome.

Steps to reproduce on IE 8.0.6: Create a post beyond the height of the post input box on an SMF 2.0 RC1-1 and watch the vertical position of the post jump or "flash" as some users have reported it.

User generated workaround: use Firefox or Chrome....
Title: Re: Display bug on long posts in IE 8.06 SMF 2 RC1-1
Post by: Norv on August 25, 2009, 04:44:22 PM
It's a known issue of Internet Explorer 8, encountered by many web applications. (and hated by them as well, you can easily imagine...)
You can find one of the reports here:      
[3354][IE8] Problems with text box scroller/cursor moving (http://www.simplemachines.org/community/index.php?topic=309186.0)


On another note, nice workaround! ;)
Title: Typing bug?
Post by: LWillisjr on September 02, 2009, 10:46:53 AM
I use another forum which also uses SMF software. I have an unusual problem and they suggested I come here and post it.

The issue is when entering test in this window. Like posting a new reply. When I get up to about 20 lines of text or so, the scroll window starts to jump to the bottom line and then back to the top with EVERY character I type. Again... this works fine up to a certain point and then the window jumping starts. So I don't know if it has to do with a certain number of lines, or a certain number of characters. I can keep inputting text, but window jumping back and forth makes it almost impossible to keep inputting text at a certain point. I just tired it and it happens on this as well. The other Forum I use where I first noticed this is peyroniesforum.net.  Any suggestions, is it a setting I need to change or make?

Running Windows XP with Internet Explorer 8.
Title: Re: Typing bug?
Post by: Arantor on September 02, 2009, 11:28:25 AM
This is a known issue with IE8 and SMF's code.

For the interim you can enable compatibility mode for your forum which should solve the problem, though it should be/is being fixed for RC2 AFAIK.
Title: Re: Typing bug?
Post by: karlbenson on September 02, 2009, 01:48:44 PM
Its not currently patched in the svn.  But I do hope we can get a fix for RC2 (at least a temporary fix until Microsoft fully patches IE8)
Title: Re: Typing bug?
Post by: Arantor on September 02, 2009, 02:38:02 PM
I thought it was fixed by now. I believe as a temporary measure you can enforce IE7 rendering in the stylesheet with the EmulateIE7 meta entry though.
Title: Re: Typing bug?
Post by: karlbenson on September 02, 2009, 09:40:42 AM
http://dev.simplemachines.org/mantis/view.php?id=3354
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: karlbenson on September 03, 2009, 04:00:05 PM
* merged several duplicate reports of the same bug.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: karlbenson on September 06, 2009, 03:23:02 PM
Moving to fixed bugs forum,

Yes, I've fixed this (I hope) in the 2.0 svn today.
Since 1.1.x doesn't even detect IE8, I've just made IE8 render 1.1.x as IE7 with the emulate IE7 tag,
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Norv on September 06, 2009, 03:51:44 PM
Great news! Thank you!
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: robarco on December 09, 2009, 12:35:22 PM
Reviving.... I dutifully visited http://dev.simplemachines.org/mantis/view.php?id=3354 but I can't find which files to edit re the textbox size, seems the filenames given refer to v 2.-?

Forum is still on 1.-  version.

Thanks for any info...
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on December 09, 2009, 05:18:14 PM
The notes are quite different for 2.0.

There is a patch applied in 1.1.11 that does not affect those lines in any way, whilst fixing the issue by using IE7 emulation.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: searchgr on December 09, 2009, 11:22:29 PM
How can i fix this issue in smf 2.0 ?
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on December 10, 2009, 02:03:41 AM
2.0 what?
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: searchgr on December 10, 2009, 02:10:00 AM
Quoteif I type a long enough post (roughly 2-3 lines past where the text box normally ends), the text box begins to act up on me.  If I type anything beyond that point, the viewed part of the text seems to "hop" up a few lines from where I am typing and I can only briefly see the line I am typing, at the very bottom of the box, for the few milliseconds during which time I press the letter key(s).  This is very annoying when writing a post, editing a post, and selecting text in the box to cut or copy.

This is the problem.

2.0 rc2
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on December 10, 2009, 02:12:13 AM
Yes, I know the problem. Just that I wanted to know which version of 2.0 as 2.0 RC2 is supposed to have a fix in it already as per the bug report mentioned earlier.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: searchgr on December 10, 2009, 02:57:23 AM
Very strange. Does anyone else that uses smf 2.0 rc2 has the same problem?
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on December 10, 2009, 03:04:25 AM
What theme is it on?
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: searchgr on December 10, 2009, 03:12:45 AM
curve

You can try , post a very long text and then try to edit it.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on December 10, 2009, 03:15:19 AM
And are you using Compatibility View at the time?
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: searchgr on December 10, 2009, 03:21:23 AM
No, i don't use it.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: robarco on December 10, 2009, 06:35:41 AM
Quote from: Arantor on December 09, 2009, 05:18:14 PM
The notes are quite different for 2.0.

There is a patch applied in 1.1.11 that does not affect those lines in any way, whilst fixing the issue by using IE7 emulation.

I am on 1.1.11 but the problem is very much alive and unfixed....  :-X
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on December 10, 2009, 06:36:20 AM
Can I see a link to your site please?
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: robarco on December 10, 2009, 07:21:58 AM
maltashootingsports.com
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on December 10, 2009, 07:30:22 AM
And it's happening in IE8? What happens if you - for testing purposes - use Compatibility View?
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: robarco on December 10, 2009, 07:51:38 AM
Works fine in Compatibility view.

Yes IE8 which I installed maybe a couple of weeks ago max.

Thanks in advance for your time, appreciated.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on December 10, 2009, 07:57:06 AM
Weird, as that would suggest IE8 is ignoring the tag that is quite clearly in the code.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: searchgr on December 10, 2009, 07:59:49 AM
Quote from: robarco on December 10, 2009, 07:51:38 AM
Works fine in Compatibility view.


Same here.

(smf 2.0/rc2)
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: robarco on December 10, 2009, 08:50:23 AM
Quote from: Arantor on December 10, 2009, 07:57:06 AM
Weird, as that would suggest IE8 is ignoring the tag that is quite clearly in the code.

Is there a way to apply the mods manually to the textbox size, or rather, where can these be applied, to the 1.1.11 version?

Thanks again
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on December 10, 2009, 09:21:45 AM
Not really since it's not a mod. It's an extra line in Load.php, which IS working as it should.

I'd ask open a new topic in the Support board to be honest; this is marked as a closed bug.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: alphacaveman on January 09, 2010, 03:09:13 PM
This issue is giving me all kinds of fits. The PHPBB forum I run doesn't experience it. Just SMF.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: NancyMB on January 25, 2010, 11:04:02 PM
We have a relatively new (~ November 2009) forum, using SMF 1.1.11.  Posters who use IE8 have reported  the "jumping text" problem when typing long replies.

After reading this thread, I suggested they use the Compatibility setting for IE, and that helps, but apparently the bug is still present.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: searchgr on March 11, 2010, 02:58:08 AM
I couldn't find a solution for this. Is there any fix?
smf 2.0 rc2

I don't want to upgrade at this moment so if there is a fix for rc3 i can edit the css file manually.

thank you
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Norv on March 11, 2010, 06:19:29 AM
I strongly recommend to upgrade, since RC3 has several security fixes.
I am not aware of the status of this particular issue in RC3, though.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on March 11, 2010, 08:48:22 AM
I'm hearing reports that this has been fixed in RC3 somewhat, but not confirmed either way myself.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: searchgr on March 11, 2010, 11:03:38 AM
Quote from: Norv on March 11, 2010, 06:19:29 AM
I strongly recommend to upgrade, since RC3 has several security fixes.
I am not aware of the status of this particular issue in RC3, though.

I have installed several mods + css modifications.... It's a big story to start again from the beginning. I hope to have the gold edition soon.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Massl on March 11, 2010, 02:06:20 PM
I have this problem with IE8 and SMF 2.0 RC 3 without any mod  :-\

The problem is present on long posts ...
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: smp420 on March 11, 2010, 02:11:56 PM
This bug has been fixed for me in RC3 well at least in this site it is.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on March 11, 2010, 02:16:06 PM
Quote from: Max_74 on March 11, 2010, 02:06:20 PM
I have this problem with IE8 and SMF 2.0 RC 3 without any mod  :-\

The problem is present on long posts ...

With or without compatibility mode enabled?
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Massl on March 11, 2010, 02:41:02 PM
Quote from: Arantor on March 11, 2010, 02:16:06 PM
Quote from: Max_74 on March 11, 2010, 02:06:20 PM
I have this problem with IE8 and SMF 2.0 RC 3 without any mod  :-\

The problem is present on long posts ...

With or without compatibility mode enabled?

Without, with compatibility mode enabled is ok.
Most users on my forum have reported this problem and I must say to all to enable the compatibility mode  :(
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on March 11, 2010, 02:41:37 PM
Argh, that's MS for you. They advised one fix a bit back but that no longer works.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: smp420 on March 11, 2010, 03:26:48 PM
I dont use compatibility mode and it works fine for me in 2.0 RC3
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: searchgr on March 11, 2010, 03:30:54 PM
Are you sure that the text is very long? Try to edit it.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Massl on March 11, 2010, 04:24:08 PM
Quote from: smp420 on March 11, 2010, 03:26:48 PM
I dont use compatibility mode and it works fine for me in 2.0 RC3

Try to edit this message
http://www.simplemachines.org/community/index.php?topic=370265.0
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: smp420 on March 11, 2010, 04:26:16 PM
I guess I just wasnt typing enough.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Massl on March 24, 2010, 10:08:12 AM
Hi, any news ?
Thanks :)
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Vincent Volmer on April 08, 2010, 03:42:15 PM
Is this fixed with RC3? I upgraded to RC3 but the problem still exist.

Thanks,
Vincent
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: searchgr on April 08, 2010, 03:47:17 PM
I really wonder if is so difficult to fix this problem!
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on April 08, 2010, 03:49:03 PM
It doesn't help when MS provide a fix (the IE7 meta tag) that they break in a later service pack of IE8.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Lennon V. C. on May 29, 2010, 06:11:57 PM
So I am assuming there is no fix right now?
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Mr. Jinx on July 30, 2010, 12:39:00 PM
Any news on this bug?
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: drroot on July 30, 2010, 08:18:07 PM
Any fix for this Bug?

I have upgraded from SMF 1.1.11 to 2.0RC3.

But the problem still exist.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Norv on July 30, 2010, 08:23:15 PM
Could you please try:
Sources/Subs-Editor.php
Code (find) Select

        'width' => isset($editorOptions['width']) ? $editorOptions['width'] : '70%',

Code (replace) Select

        // IE8 Bug - % width causes scrollbar jumping around, so use a px width.
        'width' => isset($editorOptions['width']) ? $editorOptions['width'] : ($context['browser']['is_ie8'] ?'700px' : '70%'),
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Mr. Jinx on July 31, 2010, 10:55:22 AM
Thanks for the suggestion Norv.
I tried it, but it didn't help.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Mr. Jinx on August 01, 2010, 09:59:27 AM
..but the other suggestion in the bugtracker did help! It's about a mod for GenericControls.template.php.
http://www.simplemachines.org/community/index.php?topic=388767.msg2726549#msg2726549
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Norv on August 01, 2010, 10:04:25 AM
Thank you very much for the feedback!
Apparently another attribute works now, for newer IE8 versions...
Title: I think I have THE FIX for IE8 jumping textarea = BugTrack 3354
Post by: Jscripts on August 24, 2010, 10:39:09 AM
Hi all, I am new here and not sure how to get my solution noticed by the correct part of dev team?

The problem of the Post Reply textarea jumping all over the place once the text content is big enough to need scrollbars...

Bugtracker item is here:
http://dev.simplemachines.org/mantis/view.php?id=3354 (http://dev.simplemachines.org/mantis/view.php?id=3354)

Please refer to my thread here, for details of a really simple fix:
http://www.simplemachines.org/community/index.php?topic=397316.0 (http://www.simplemachines.org/community/index.php?topic=397316.0)

EDIT - I just found the thread http://www.simplemachines.org/community/index.php?topic=309186.80
- Mods, please merge / move / whatever
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Jscripts on August 24, 2010, 10:56:04 AM
Hi all, I am new here and not sure how to get my solution noticed by the correct part of dev team?

Bugtracker item is here:
http://dev.simplemachines.org/mantis/view.php?id=3354

Please refer to my thread here, for details of a really simple fix:
http://www.simplemachines.org/community/index.php?topic=397316.0

Seems to work in all browsers, no special kludges required  ;D
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Norv on August 24, 2010, 12:32:56 PM
Hello there, and welcome to SMF!
Thank you for the interest and for sharing your solution. :)

It feels a bit hacky ;), but it appears to work.

On another note, answering your other topic, the Bug Tracker is read only for community members. Testers and SMF team members or former team members can post into it. This board however is fully dedicated to issues discussions, reports, solutions, and open to everyone.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Oya on August 24, 2010, 02:10:07 PM
except anything that calls for its own size of editor widget wont work :( will break on my site then
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Jscripts on August 25, 2010, 04:48:47 AM
Quote from: Oya on August 24, 2010, 02:10:07 PM
except anything that calls for its own size of editor widget wont work :( will break on my site then

Not sure how that would break anything - the Style still controls the resultant size - you can change that with hard-coding or with JS after the page has loaded.

So, if you want 300px wide textarea, you can still set the style's width to that, or use a percentage - if it's a mod then you are the one who's coding the numbers, so you can set it however you wish! The COLS attribute is supposed to be lower in the "pecking order" than the style! Remember, the original command is "66 COLS" then over-ride that with width:100%... instead, all we are doing is telling it to ignore COLS=6000 instead of ignoring COLS=60  ;)

The solution is simply to ensure that your style width=percentage command is resizing the textarea smaller, and never larger  ???

What I had originally considered was to detect the width of the textarea's parent element using a small script, and then after the page had loaded to use JS to dynamically resize the textarea to an absolute number. But the hassle then is handling the window.onResize event... would have to have a listener there to resize the textarea each time the width of the page was altered by the user.

There's enough stuff going on in the background anyway with the onClick etc... it doesn't need any more event-driven JS running!

By the way - the majority of the "cursor jumping" problem is being caused by those event listeners for what gets typed into the editor box. I haven't checked the *.js files - but I assume that those are attempting to track the position of the cursor or something? Try it - if you disable those, the textarea operates reasonably "normally" in IE8. Whilst there is a minor IE bug, it's the strange 'storeCaret(this)' function which is actually making the bug cause the strange behaviour.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Oya on August 25, 2010, 06:33:22 AM
i dont think you understand

when the editor is created with control_create_richedit one of the parameters is width which cannot be set using your method

and by the way the majority of the cursor jumping isnt the event listeners since it happens outside the wysiwyg editor as it happened in 1.1.10 and the ie7 compatibility tag was added its an ie8 bug with textboxes that arent a fixed but percentage width since plenty of other systems had the same problem
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Jscripts on August 26, 2010, 10:02:30 PM
Hi Oya

I understand perfectly, but I only installed the new forum a few days ago so I am not conversant with the new code. I have other boards running 1.1.9, but this is my first 2.0.

Quotewhen the editor is created with control_create_richedit one of the parameters is width which cannot be set using your method

It is totally irrelevant "how" the editor gets created... the modification is hard-coded into section of the script that actually creates the final HTML. You can call the function with whatever width you like - it still gets set by whatever parameter is passed by $editorOptions['width']. So, if you call it with width=20%, the editor will still get created at 20%. If you call it with width=300px, then the editor will get created with 300px wide.

From your comments, I am guessing that (unlike Norv) you haven't actually tried my solution, have you?  ;)

-----

Anyway, I have found that the cludge is not perfect, so I am coding a Javascript solution instead.

What this does is detects IE8 then converts any existing style width from a percentage to absolute pixels, and also resizes the message textarea upon a window resize event.

My test page is working beautifully now, and means that no existing code needs to be altered (it's an add-on script, will use PHP to insert the script tag conditionally if IE8 is detected)

I was trying NOT to do this in JS, but I've found that my previous "HTML solution" is definitely an improvement on the esiting SMF code but is not 100% reliable in all cases.

Back soon with a demo, once I get the JS tweaked.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Oya on August 26, 2010, 10:57:13 PM
i didnt try it because it would break some of the stuff on my site like i said
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Jscripts on August 27, 2010, 12:00:55 AM
LOL - how could it break something on your site, but not on mine or anybody elses? But anyway...

My Javascript fix is completed and works great. It's a one liner for a *.JS call, which load a script that detects if the browser is IE8. If so then it dynamically changes any % style to a px style for the editor width. Works on load and on window resize.

You'll have to upload a remote *.JS file somewhere for it to run from, but that has the advantage that the fix is easier modified than hard-coding inside the PHP if we need to tweak it later. The original PHP will work as-is, as will any parameters passed to the PHP (irrespective of how or where or when) - it runs AFTER the textarea is created.

I've gotta go to the office for a while, so will be back in about 8 hours with a demo. I suppose we'll need to find somebody to test it who is actually prepared to install the code to try it  :o  ;D

GRRR - I've just realised that it has to detect both max-width as well as width, since there are a couple of variants of PHP out there in the wild. Could somebody please clarify that for me... my version used the max-width and min-width (but not width), what else is there?

If somebody can help me to understand where else and HOW that editor box gets created, I can test all the various options. Right now I am just using document.getElementById("message") - is that the only way that the editor box is "named"?

Cheers, J
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Oya on August 27, 2010, 03:14:55 AM
because like i said i actually use that parameter for a mod i made! that means on my site your hack will change what my site does

the code is added in genericcontrols.template
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Norv on August 27, 2010, 11:04:56 AM
Quote from: Jscripts on August 27, 2010, 12:00:55 AM
My Javascript fix is completed and works great. It's a one liner for a *.JS call, which load a script that detects if the browser is IE8. If so then it dynamically changes any % style to a px style for the editor width. Works on load and on window resize.

It may be useful to take a look at Themes/default/scripts/script.js, it defines is_ie8. Also, in GenericControls.php, $context['browser'] is populated, like for example $context['browser']['is_ie8'].
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Jscripts on September 02, 2010, 04:42:05 PM
Quote from: Oya on August 27, 2010, 03:14:55 AM
because like i said i actually use that parameter for a mod i made! that means on my site your hack will change what my site does

the code is added in genericcontrols.template

Yes, I realise that - however the both mods that I have made (both the simple one already posted, and the new code I'm creating), allow infinite changes to the width parameter, inside genericcontrols.template. You can set that width to anything you like (either percentage or pixels) and the value is still passed on and works perfectly.

I've tested it extensively... I know it works because neither of my changes makes any alteration whatsoever to the existing SMF code - they simply correct the results of the IE8 bug. If you are so concerned about this and running a hack - what is it? If you were specific, then I can check for you (since you are not prepared to do so).
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Jscripts on September 02, 2010, 04:54:26 PM
Quote from: Norv on August 27, 2010, 11:04:56 AM
Quote from: Jscripts on August 27, 2010, 12:00:55 AM
My Javascript fix is completed and works great. It's a one liner for a *.JS call, which load a script that detects if the browser is IE8. If so then it dynamically changes any % style to a px style for the editor width. Works on load and on window resize.

It may be useful to take a look at Themes/default/scripts/script.js, it defines is_ie8. Also, in GenericControls.php, $context['browser'] is populated, like for example $context['browser']['is_ie8'].

Thanks Norv. I have the code working perfectly, using JS detection because that was it can be tweaked later if there is a M$ fix.

My main difficultly is that I am not conversant with SMF 2 code, so I don't know where else this editor box is having "the problem".

Is it just the main (post reply) editor when it's running in "non-WYSIWIG" mode? Are there other instances of textareas within SMF that exhibit the same jumping problem?

I've been caught up on another project the past few days... will get back to documenting my mod over the weekend. I'm curently testing it on my new forum anyway.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Oya on September 02, 2010, 04:59:02 PM
QuoteI've tested it extensively... I know it works because neither of my changes makes any alteration whatsoever to the existing SMF code - they simply correct the results of the IE8 bug. If you are so concerned about this and running a hack - what is it? If you were specific, then I can check for you (since you are not prepared to do so).

in my mod i pass a width value to the control-create-richedit when it is created maxing it at 50% which as far as i can tell wont work with your hack

QuoteIs it just the main (post reply) editor when it's running in "non-WYSIWIG" mode? Are there other instances of textareas within SMF that exhibit the same jumping problem?

quick reply box which isnt wysiwyg is also affected in most cases and potentially and oversize large_text edit boxes in the admin panel (which will be mod only)
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Jscripts on September 03, 2010, 07:57:43 PM
Quotequick reply box which isnt wysiwyg is also affected in most cases and potentially and oversize large_text edit boxes in the admin panel (which will be mod only)

Thanks - I'll take a look at those and change the new script to fix those as well.

There is no point making a fix that only solves one instance of the textarea problem. I suppose I could create a loop and run through EVERY textarea on every page, but I'd prefer to only address those textareas that speciifcally have the problem. Therefore, I must refer to a specific Object (I am testing with "message", which is the non-WYSIWYG main editor).

My difficulty isn't with solving the problem, but rather because I only installed SMF2 a few days ago. So I don't even know where the problem occurs... it annoyed the hell out of me in SMF1.x, but honestly thought that such an annoying (yet easily-fixed) problem would be resolved in a brand new (pre)release!  :o
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Oya on September 03, 2010, 07:59:12 PM
the problem is actually ie8 not actually an smf bug exactly

more accurately its a bug in ie8 that smf actually put a workaround in 1.1.11 for and that the pre releases of 2.0 havent fixed yet
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Jscripts on September 03, 2010, 08:44:28 PM
Quote from: Oya on September 02, 2010, 04:59:02 PM
in my mod i pass a width value to the control-create-richedit when it is created maxing it at 50% which as far as i can tell wont work with your hack

OK, I see that I need to explain the fix more clearly...

This is the code at the very beginning of the "standard" SMF function template_control_richedit, which is inside GenericControls.template.php

I have edited the PHP for readabilty, but not changed the content

<textarea class="editor" name="', $editor_id, '" id="', $editor_id, '" rows="', $editor_context['rows'], '"
cols="60" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);"
onchange="storeCaret(this);" tabindex="', $context['tabindex']++, '"
style="', $context['browser']['is_ie8'] ? 'max-width: ' . $editor_context['width'] . '; min-width: ' . $editor_context['width']
: 'width: ' . $editor_context['width'], '; height: ', $editor_context['height'], ';', isset($context['post_error']['no_message'])
|| isset($context['post_error']['long_message']) ? 'border: 1px solid red;' : '', '">', $editor_context['value'], '</textarea>


This code sets the Style's "width" conditionally, depending if  it is IE8 or not... here is is again, edited a bit more to make it clearer:

style="', $context['browser']['is_ie8']
? 'max-width: ' . $editor_context['width'] . '; min-width: ' . $editor_context['width']
: 'width: ' . $editor_context['width'],


Whatever value that is stored inside $editor_context['width'] is passed through to the HTML in this way:
- if it's IE8, it sets max-width and min-width
- otherwise it sets width.

OK, now stay with me here... my code DOESN'T change any of that!

If you leave $editor_context['width'] as 100% (the default), then the resultant  HTML will read:

<textarea class="editor" name="message" id="message" rows="12" cols="60"
onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);"
onchange="storeCaret(this);" tabindex="2"
style="max-width: 100%; min-width: 100%; height: 175px;">


To the Browser, this says:
"Create a TEXTAREA that is 60 COLumnS wide
... and then forget about that, and use CSS styles to size it to 100% of the parent (DIV)"


However, if you customise your SMF and set the value inside $editor_context['width'] to 50%, then the resultant HTML will read:

<textarea class="editor" name="message" id="message" rows="12" cols="60"
onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);"
onchange="storeCaret(this);" tabindex="2"
style="max-width: 50%; min-width: 50%; height: 175px;">


To the Browser, this says:
"Create a TEXTAREA that is 60 COLumnS wide
... and then forget about that, and use CSS styles to size it to 50% of the parent (DIV)"


See the difference? OK, now my original fix doesn't alter any of that, except to tell the browser to:

"Create a TEXTAREA that is 6000 COLumnS wide
... and then forget about that, and use CSS styles to size it to (whatever)% of the parent (DIV)"


Can you see it? All this does is tell the browser a different number of columns THAT IT MUST IGNORE
- so, instead of ignoring COLS=60, instead it must ignore COLS=6000

The actual style still gets set to whatever is stored inside $editor_context['width'] - whether that is 100%, 50%, or 40px, that is irrelevant!  :)

------

Anyway, the whole thing is an awful cludge, and it really needs to be re-written. I've made a small Javascript that corrects the IE8 bug, and then I'm removing all that messy (conditional styles for IE) stuff from the SMF code.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Jscripts on September 03, 2010, 09:14:28 PM
By the way, the SMF code is what's causing the problem... it's making a tiny and almost insignicant IE8 bug into something much much worse, completely destroying the functionality of the forum editor for the majority of users.

The main part of the SMF code that causes it is the onclick="storeCaret(this);" and other event handlers... these are what makes the textarea jump!

You can confirm this by removing them from the code... the textarea then works in a much more "normal" fashion. Furthermore, have you noticed that the Textarea doesn't jump about when the editor is in WYSIWYG mode?

------------

Whilst playing with this stuff, you needn't test on a live forum or the PHP itself - just go to your own forum and do a "File > Save as > Webpage Complete". Then you can open that saved HTML and work on an exact "clone" of the page and test things.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Oya on September 04, 2010, 05:56:26 AM
first up the default width of the editor component is 70% not 100% as evidenced by subs-editor.php

it is also not practical to test it on a non working installation seeing how you also need to test it going back and forth between wysiwyg mode which explicitly needs to be on a working installation as it calls back to php to update stuff

sure i noticed it doesnt jump about in wysiwyg mode now but do you know why thats the case the wysiwyg editor doesnt actually work on the textarea so it doesnt trigger the bug
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: papabill on September 05, 2010, 09:15:22 AM
I was having thd same problem, but after reading the replies to this original post, I installed and tried FireFox and the problem went away. Just another reason to avoid IE altogether.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: digit on February 28, 2011, 02:53:34 PM
Any news about this bug?

I'm running 1.1.13 and still have this ...

$context['html_headers'] .= '<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />';

...in my Load.php 

Sure would like a real fix. :)

Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on February 28, 2011, 03:54:48 PM
That IS the fix handed down by Microsoft...
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: digit on February 28, 2011, 03:59:06 PM
Yikes...   an advert dressed like some innocuous code.

Nice.  Leave it to Microsoft to make every jump through hoops for their butts.
Title: Re: [3354][IE8] Problems with text box scroller/cursor moving.
Post by: Arantor on February 28, 2011, 04:04:51 PM
And they broke it more than once too, in IE service packs.