Advertisement:

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003354SMF 2.0public2009-03-21 10:152010-09-20 08:17
Reporterregularexpression 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0003354: [IE8] Non-Wysiwyg post editor scrolls half way up after pasting chunk of text
DescriptionReported by Riker
Confirmed on Latest svn

Strange behavior in IE8 (non-compat mode).

Only affects Non-WYSIWYG.
But doesn't affect standard textareas used for signatures, news etc.
So most likely an smf bug rather than IE8 one.

http://www.simplemachines.org/community/index.php?topic=300154.msg1984792#new [^]
TagsCurve, RC3, With Fix
Attached Files

- Relationships
has duplicate 0003586closed Posting screen not scroll in IE8 

-  Notes
(0007876)
Aaron (Developer)
2009-04-05 16:25

This doesn't only happen after posting a chunk text, but also after moving the cursor in and out of the textarea. Weirdness.
(0008202)
regularexpression (Viewer)
2009-05-04 14:16

In a google search I found a couple of other posts which mentioned this same behavior in Wordpress and other software.

But not any documentation on it or anything.
(0008564)
regularexpression (Viewer)
2009-06-06 20:36
edited on: 2009-06-06 21:20

http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?dg=microsoft.public.internetexplorer.beta&tid=b95398ac-e5cc-4642-9c9f-d85d08deeac6&cat=en_us_2BAF8EC5-645C-4477-A380-0F1CF6C102F9&lang=&cr=&sloc=&p=1 [^]

In the month since my last post, this IE8 bug has turned up all over the net.
The only solution I could find on the net is to NOT set a percentage(%) width for the editor (until Ms fix the bug)

Sources/Subs-Editor.php
FIND
        'width' => isset($editorOptions['width']) ? $editorOptions['width'] : '70%',
REPLACE
        // IE8 Bug - % width causes scrollbar jumping around, so use a px width.
        'width' => isset($editorOptions['width']) ? $editorOptions['width'] : ($context['browser']['is_ie8'] ?'700px' : '70%'),

However setting a fixed width might be good for all resolutions.
I did a bit of testing and discovered that that we can abuse min-height/max-height instead.
1. Set fixed width (to anything), [i used 700px just in case]
2. Set min-width afterwards to the percentage width eg 70%
3. Set max-width afterwards to the percentage width eg 70%
WHAHALA!. No more jumping around.

Themes/default/GenericControls.template.php (and similarly for Curve)
FIND
                            <textarea class="editor" name="', $editor_id, '" id="', $editor_id, '" rows="', $editor_context['rows'], '" cols="', $editor_context['columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', $context['tabindex']++, '" style="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>
REPLACE
                            <textarea class="editor" name="', $editor_id, '" id="', $editor_id, '" rows="', $editor_context['rows'], '" cols="', $editor_context['columns'], '" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onchange="storeCaret(this);" tabindex="', $context['tabindex']++, '" style="', ($context['browser']['is_ie8'] ? 'width: 700px; 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>

What do you guys/gals think? Can I go ahead and commit a fix (preferably the latter solution)?

(0008690)
regularexpression (Viewer)
2009-06-11 18:10

I haven't committed this yet as I'm still pondering about other textareas as they may be affected too.
(0009094)
regularexpression (Viewer)
2009-07-11 16:22

*removed the withfix tag.

Whatever solution is implemented will need to cover (at minimum)
Normal post window (non-wysiwyg textarea), quick reply, quick edit

May also need to backport this fix for 1.1.x branch until microsoft fixes it.

Setting max-width: min-width: seems to be the best option for ie8 instead of a width;
(0009543)
Oldiesmann (Project Support)
2009-09-01 00:47

I can confirm that this happens with 1.1.x as well. A few members of a seniors forum I help out with have reported this.
(0009555)
Arantor (Viewer)
2009-09-02 14:46

Since it's a rendering engine issue in IE8, and compatibility view fixes it, wouldn't a quick workaround be the emulate IE meta tag?

I appreciate it's not ideal but as an interim measure until the bug is fixed?

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
(0009556)
karlbenson (SMF Friend)
2009-09-02 21:57

I wouldn't recommend it. IE7 has its own bugs and we'd be simply trading one or two in IE8 for alot more. Plus slower rendering etc.

I'm not sure how smf's detection would work. If IE8 is still in the useragent then no IE7 fixes would get applied.
Whilst users might get away with the emulateIE7 tag for 1.1.x (where IE8 is not recognised other than as IE), I'm not sure it would be good for 2.x

Ideally I'm hoping to do a fix for RC2. Probably with max-height/min-height
(since cols property is mandatory in xhtml otherwise we get an xhtml error).
Its just whether this is hard-coded in the template/source files, or in a .css file.
(0009579)
karlbenson (SMF Friend)
2009-09-06 13:29

 * IE8 bug with bouncy textareas. Set max-width and min-width instead of width for fullreply, quick reply, quickedit etc (Few files) Revision 8987
(0010239)
Owdy (SMF Friend)
2009-10-06 04:16

This bug is back. RC2, user with IE8. Says if post are larger than post screen, cursor dances around.
(0010241)
karlbenson (SMF Friend)
2009-10-06 07:36

For me this is for Curve + Core.

Are they using a different theme that doesn't have the fix applied
(0010243)
Owdy (SMF Friend)
2009-10-06 09:01

They tested it with RC2 Curve.
(0010256)
karlbenson (SMF Friend)
2009-10-06 14:11

The only situation I can get it to occur is if I send a false useragent.
It which case smf doesn't correctly detect it as IE8, and the IE8 fix isn't applied.
(0010259)
Owdy (SMF Friend)
2009-10-06 14:43

That user use IE8 with default settings. Trust me on that :D
(0010262)
karlbenson (SMF Friend)
2009-10-06 17:44

Can anyone else get the issue to occur?

I'm having no luck on my home and work pc.
(0010272)
Owdy (SMF Friend)
2009-10-07 14:34

User says compatibility mode fixes it
(0010275)
karlbenson (SMF Friend)
2009-10-07 14:41

Indeed it does, but I'm still adamant that this issue is fixed in RC2 for Core and Curve.

;)
(0010278)
Owdy (SMF Friend)
2009-10-07 15:37
edited on: 2009-10-07 15:46

Well i dont know what to say to you. I use RC2 and she testetd it with curve theme.

edit: i PM you test account

(0010279)
karlbenson (SMF Friend)
2009-10-07 15:49

Well I can't get it to occur on my localhost
But can on your site.

Looking at it again, it could potentially be caused by
/* The main post box - this makes it as wide as possible. */
.editor
{
    width: 96%;
}

Need to get rid of that for IE8.
(0010513)
TE (Developer)
2009-10-21 15:02

* * IE8 bug with bouncy textareas. Set max-width and min-width instead of width for fullreply (GenericControls template) Revision 9253
(0012577)
Norv (Developer)
2010-07-18 12:35
edited on: 2010-07-18 12:36

It seems this still happens.

As far as I can see (without testing), and as reported by community users, a fix like the one indicated for Sources/Subs-Editor.php was not applied:
Find:
        'width' => isset($editorOptions['width']) ? $editorOptions['width'] : '70%',
Replace:
            'width' => isset($editorOptions['width']) ? $editorOptions['width'] : ($context['browser']['is_ie8'] ?'700px' : '70%'),

(cf. http://www.simplemachines.org/community/index.php?topic=376321 [^] )

(0012735)
Norv (Developer)
2010-08-01 10:03

Setting width instead of max-width is reported to work.
(0012809)
Norv (Developer)
2010-08-15 14:26

Ant, what do you think of this one?
Implement these? http://dev.simplemachines.org/mantis/view.php?id=3354#c8564 [^]
(0012848)
Antechinus (Developer)
2010-09-01 04:48

NFI. I can't test with a native IE8 anyway. It screws up on my box so I'm running native IE7 with IETester for emulating 8.
(0013026)
Antechinus (Developer)
2010-09-20 06:15
edited on: 2010-09-20 06:23

The max-width dodges didn't seem to be all that good IIRC. There's a better fix somewhere on the boards. Will find it again.

ETA: Found it. http://www.simplemachines.org/community/index.php?topic=397316.msg2757838#msg2757838 [^]

Will have to test of course and that will require someone running native IE8.

(0013027)
Norv (Developer)
2010-09-20 06:46

IMHO we should do this, and notify for more testing on native IE8, pre-RC4.
(0013032)
Antechinus (Developer)
2010-09-20 08:17

 * Yet another attempted fix for that damned IE8 cursor bug (GenericControls.template.php) Revision 10121
MantisBT 1.2.8 (Modified)[^] Copyright © 2000 - 2010 Mantis Group