Opened 14 years ago
Last modified 13 years ago
#7984 confirmed Bug
AutoGrow fails on Firefox with document that has quirks mode Doctype
Reported by: | Dan Lee | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.4 |
Keywords: | IBM | Cc: | satya_minnekanti@… |
Description (last modified by )
Steps:
- Grab latest nightly. (I used Revision number: 7007).
- Add
config.fullPage = true;
to the config - Open the Autogrow sample in Firefox 4.
- Click on Source on the default configuration autogrow sample.
- Add the following Doctype above the html element:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- Click Source again to go back to WYSIWYG mode.
- Enter several newlines to make the document taller than the contents.
Results: Autogrow fails. The height of the document is not adjusted.
Removal of the Doctype appears to fix the problem. Also appears to occur in Chrome on Mac.
Attachments (5)
Change History (30)
comment:1 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 14 years ago by
Status: | new → confirmed |
---|
comment:3 Changed 14 years ago by
comment:4 Changed 14 years ago by
What makes the original bug report more important is that the autogrow plugin stopped working were it used to work, for example in IE8 in the default mode (when fullPage
is turned off).
To confirm this, simply enable the autogrow plugin in config.js and check the replacebyclass sample with doctype set to <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
(or without doctype at all).
comment:5 Changed 14 years ago by
Milestone: | → CKEditor 3.6.1 |
---|
Changed 14 years ago by
Attachment: | 7984.patch added |
---|
comment:6 Changed 14 years ago by
Owner: | set to Sa'ar Zac Elias |
---|---|
Status: | confirmed → review |
Quirks still requires the dirty 24px hack.
comment:7 Changed 14 years ago by
This looks good in Firefox, Chrome, and IE9. I am still able to reproduce the problem in IE8 and IE7 though. I added the patch to my local nightly, made fullPage=true, and added the same doctype to the top of the HTML: <!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01 TransitionalEN">
IE8 and IE7 do not grow when typing multiple newlines.
comment:8 Changed 14 years ago by
Status: | review → review_failed |
---|
We need to avoid hard coded magic number, it depends on, e.g. margin from the document styles.
Changed 14 years ago by
Attachment: | 7984_2.patch added |
---|
comment:9 Changed 14 years ago by
Cc: | satya_minnekanti@… added |
---|
comment:10 Changed 14 years ago by
Owner: | changed from Sa'ar Zac Elias to Garry Yao |
---|---|
Status: | review_failed → review |
comment:11 Changed 14 years ago by
Status: | review → review_failed |
---|
- In IE, using a Quirks document and a Quirks host page, autogrow doesn't work.
- In Opera and Chrome (didn't test Safari), using a Quirks document, the editor size is not reduced back when removing newly created lines.
Changed 14 years ago by
Attachment: | 7984_3.patch added |
---|
comment:12 Changed 14 years ago by
Status: | review_failed → review |
---|
In IE, using a Quirks document and a Quirks host page, autogrow doesn't work.
Some older IEs need a small timeout after altering the editor size.
In Opera and Chrome (didn't test Safari), using a Quirks document, the editor size is not reduced back when removing newly created lines.
Unfortunately we had this limitation in quirks mode of Webkit and Opera where the actual content height cannot be figured out by looking at box model, how about live with it now (as it's not a regression).
comment:13 Changed 14 years ago by
Status: | review → review_passed |
---|
comment:14 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [7018].
comment:15 Changed 14 years ago by
I pulled in the latest from trunk and ran the same test. (Change config to fullPage=true;, open the autogrow sample, add this doctype to the top: <!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01 TransitionalEN">
Things look good in IE7 and IE8, but I am seeing some strange behavior in IE9 where the document grows on any keystroke. Just me?
comment:16 Changed 14 years ago by
Did a little digging too.... With the quirks mode doctype in the autogrow sample in IE9, line 30 of the autogrow plugin indicates an increase on all events.
It looks like scrollable.scrollHeight and scrollable.clientHeight are different in cases where they should be the same. (I'm seeing a 16pixel difference, resulting in 'increase' being 16 on each and every keystroke, regardless of whether this keystroke should cause a grow).
comment:17 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I've just figured out a better approach to shape it better, so requires another review, the new patch is supposed to be working in all browsers.
Changed 14 years ago by
Attachment: | 7984_4.patch added |
---|
comment:18 Changed 14 years ago by
Status: | reopened → review |
---|
comment:19 Changed 14 years ago by
Status: | review → review_failed |
---|
Fails in Webkit with enterMode=BR, after hitting ENTER enough times to create scrollbars.
Changed 14 years ago by
Attachment: | 7984_5.patch added |
---|
comment:20 Changed 14 years ago by
Status: | review_failed → review |
---|
An idea shared by Saar to use marker node for measurement when last element is not available.
comment:21 Changed 14 years ago by
Status: | review → review_passed |
---|
comment:22 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [7032], thanks for very participants.
comment:23 Changed 14 years ago by
Milestone: | CKEditor 3.6.1 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Version: | 3.6.1 (SVN - trunk) |
comment:24 Changed 14 years ago by
Keywords: | IBM added |
---|
comment:25 Changed 13 years ago by
Status: | reopened → confirmed |
---|---|
Version: | → 3.4 |
After reverting the changes, @wwalc TC is still applicable but the result is a little different.
If you set config.fullPage = true;
, open autogrow sample and paste the below code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> <p> This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p> </body> </html>
You will see that with every letter typed editor grows.
Reproducible in Firefox (3.6-5) from CKEditor 3.4.2 and in IE9 from CKEditor 3.4
In Webkit - enlarging editor works fine but if you delete part or whole of its contents it will not get smaller. I have reported this issue here #8133
Confirmed in FF 4.0.1/XP using the following source:
Note that in CKEditor 3.6 the result was even more strange, the autogrow plugin "worked", but the calculated size of the editing area was totally wrong and was increasing with each typed letter.