For quite some time, we've been outputting HTML pages with a half-doctype declaration, with no DTD specified:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Browsers interpret such a doctype as not quite reliable, and render pages in so-called "quirks" mode for backwards compatibility with the parsing and rendering bugs of earlier versions. It's been occasionally suggested that it's superior to include also a URL to the DTD, which will put browsers into a stricter, standards-compliant mode:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
A couple days ago I slipped this in. All well and good in Mozilla, but in Internet Explorer 6.0 (I haven't tried 5.x) this triggers a selection bug, such that trying to select text with the mouse selects everything from the beginning of the document to the point where you've got the mouse, instead of the portion of text you're dragging over. Not very helpful.
Since, unfortunately, a lot of people use this dreadful program, and this is a _really_ annoying browser bug, I've temporarily taken the DTD reference back out, so we're back to quirks mode, where selection works.
Sigh...
-- brion vibber (brion @ pobox.com)
On Sun, 29 Jun 2003 21:30:47 -0700, Brion Vibber brion@pobox.com gave utterance to the following:
For quite some time, we've been outputting HTML pages with a half-doctype declaration, with no DTD specified:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Browsers interpret such a doctype as not quite reliable, and render pages in so-called "quirks" mode for backwards compatibility with the parsing and rendering bugs of earlier versions. It's been occasionally suggested that it's superior to include also a URL to the DTD, which will put browsers into a stricter, standards-compliant mode:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
A couple days ago I slipped this in. All well and good in Mozilla, but in Internet Explorer 6.0 (I haven't tried 5.x) this triggers a selection bug, such that trying to select text with the mouse selects everything from the beginning of the document to the point where you've got the mouse, instead of the portion of text you're dragging over. Not very helpful.
Since, unfortunately, a lot of people use this dreadful program, and this is a _really_ annoying browser bug, I've temporarily taken the DTD reference back out, so we're back to quirks mode, where selection works.
I don't use MSIE for anything other than checking pages to see how many hacks I have to work in to make IE behave, but in all of my time reading HTML groups and forums where the standard advice is to use a fully- qualified DTD, I have never heard mention of such a bug. Are you sure that there isn't some other markup error in the Wikipedia pages which is combining to create the effect in IE?
Richard Grevers wrote:
I don't use MSIE for anything other than checking pages to see how many hacks I have to work in to make IE behave, but in all of my time reading HTML groups and forums where the standard advice is to use a fully- qualified DTD, I have never heard mention of such a bug. Are you sure that there isn't some other markup error in the Wikipedia pages which is combining to create the effect in IE?
The page I tested ([[Ozone]] a couple hours ago) validated in the w3 validator, which is usually a good sign. Of course it's possible that there is misuse of markup that validates, and works correctly in Mozilla, and works correctly in IE6 in quirks mode, but _ought_ to cause this type of selection. :)
Most likely there is a pecularity in our markup (possibly incorrect, possibly not), such that the combination of some particular feature of our page and IE's non-quirks rendering mode results in the strange selection behavior. Most likely, if a minimal case can be constructed, it can be worked around. I haven't had a chance to rip the page apart to find it yet.
I have not tried to validate the stylesheet, so that's another factor to examine. Of course, stylesheets don't have doctypes...
-- brion vibber (brion @ pobox.com)
Richard Grevers wrote:
I don't use MSIE for anything other than checking pages to see how many hacks I have to work in to make IE behave, but in all of my time reading HTML groups and forums where the standard advice is to use a fully- qualified DTD, I have never heard mention of such a bug. Are you sure that there isn't some other markup error in the Wikipedia pages which is combining to create the effect in IE?
Here's a minimal test case:
http://leuksman.com/misc/with-dtd.html http://leuksman.com/misc/without-dtd.html
It's got a single <div> with the style 'position: absolute' applied.
-- brion vibber (brion @ pobox.com)
Brion Vibber wrote:
Here's a minimal test case: It's got a single <div> with the style 'position: absolute' applied.
Now with selectable doctypes: http://leuksman.com/misc/probdemo
The selection problem triggers with the HTML 4.0 or 4.01 transitional doctypes only with a DTD reference, or with the HTML 4.0/1 strict and XHTML 1.0 transitional doctypes with or without a DTD reference.
Tested with Internet Explorer 6.0.1800.1106IC on Windows 98.
-- brion vibber (brion @ pobox.com)
On Mon, 30 Jun 2003 00:07:36 -0700, Brion Vibber brion@pobox.com gave utterance to the following:
Richard Grevers wrote:
I don't use MSIE for anything other than checking pages to see how many hacks I have to work in to make IE behave, but in all of my time reading HTML groups and forums where the standard advice is to use a fully-qualified DTD, I have never heard mention of such a bug. Are you sure that there isn't some other markup error in the Wikipedia pages which is combining to create the effect in IE?
Here's a minimal test case:
http://leuksman.com/misc/with-dtd.html http://leuksman.com/misc/without-dtd.html
It's got a single <div> with the style 'position: absolute' applied.
Hmm, I get the opposite effect (with the standards-mode DTD it selects everything between the cursor and the end of the document!)
I've never looked closely at the wikipedia markup - does it have everything positioned? What seems to be happening is that because there is no content in the general flow of the page, the body ends right at the top. THis can be illustrated with the standards version of your test file by adding a single <p> with a line of text following but outside the positioned div. The text will overlap - don't worry about that for now, but notice that selection is normal when you are in the first line of the positioned div and problematic below that (below the end of body).
Layouts where every element is positioned seldom work smoothly, and I'm sure this can be done more tidily by other means. I'd be happy to investigate but am in the middle of moving house 700km away, so it will be a fortnight before I can get to it.
Richard Grevers wrote:
Hmm, I get the opposite effect (with the standards-mode DTD it selects everything between the cursor and the end of the document!)
I've never looked closely at the wikipedia markup - does it have everything positioned?
Of sorts; the whole page except the sidebar is slapped into a div with this style: #content { position: absolute; top: 0; margin: 0; padding: 0; }
Since there isn't anything else about I don't see as it's strictly necessary. :) Removing the position & top leaves us with a few blank pixels at the top of the screen, but ought not have any ill effects.
I've gone ahead and made the switch. We've got our doctype & DTD back, and with non-absolutely-positioned content, IE's selection bug seems to go away.
So hopefully it won't turn out that there was a good reason for the absolute positioning that I've just broken. ;)
What seems to be happening is that because there is no content in the general flow of the page, the body ends right at the top.
ARRRRGHHHH! That's no excuse not to select text that it's willing to show, though... :)
Layouts where every element is positioned seldom work smoothly, and I'm sure this can be done more tidily by other means.
Yeah, well they *should* work dammit! :)
I'd be happy to investigate but am in the middle of moving house 700km away, so it will be a fortnight before I can get to it.
Well, hopefully it's in hand... good luck moving!
-- brion vibber (brion @ pobox.com)
On Mon, 30 Jun 2003 01:44:07 -0700, Brion Vibber brion@pobox.com gave utterance to the following:
I've gone ahead and made the switch. We've got our doctype & DTD back, and with non-absolutely-positioned content, IE's selection bug seems to go away.
So hopefully it won't turn out that there was a good reason for the absolute positioning that I've just broken. ;)
What seems to be happening is that because there is no content in the general flow of the page, the body ends right at the top.
ARRRRGHHHH! That's no excuse not to select text that it's willing to show, though... :)
Layouts where every element is positioned seldom work smoothly, and I'm sure this can be done more tidily by other means.
Yeah, well they *should* work dammit! :)
You want to see the fun and games once you introduce draggable, resizable floating elements via DOM! In some browsers dragging also selects the text beneath the mouse.
Brion Vibber wrote in part:
So hopefully it won't turn out that there was a good reason for the absolute positioning that I've just broken. ;)
Perchance, is this on [[test:]] now but not on [[en:]]. Because on [[test:]], the sidebar runs across the entire page, lying on top of the content (but transparently). Specifically, its horizontal rules run all the way across, and the content is unclickable and unselectable wherever there is some sidebar to the left of it.
-- Toby
I wrote:
Perchance, is this on [[test:]] now but not on [[en:]]? Because on [[test:]], the sidebar runs across the entire page, lying on top of the content (but transparently). Specifically, its horizontal rules run all the way across, and the content is unclickable and unselectable wherever there is some sidebar to the left of it.
I forgot to note that this is with Netscape 6 or IE 5 on Windows 9x.
-- Toby
On Mon, 30 Jun 2003, Toby Bartels wrote:
Perchance, is this on [[test:]] now but not on [[en:]].
Nope, It's on en: but not on test.wikipedia.org. (There is no [[test:]])
Because on [[test:]], the sidebar runs across the entire page, lying on top of the content (but transparently). Specifically, its horizontal rules run all the way across, and the content is unclickable and unselectable wherever there is some sidebar to the left of it.
That's totally unrelated. I rearranged the directory structure of test.wikipedia.org to match the others, and seem to have broken the style sheet directory. :P I thought I fixed that already...
Aha, the *directory* was fine, but the settings were trying to load things from the wrong place.
Should be better now.
-- brion vibber (brion @ pobox.com)
"Brion Vibber" skribis:
Richard Grevers wrote:
I don't use MSIE for anything other than checking pages to see how many hacks I have to work in to make IE behave, but in all of my time reading HTML groups and forums where the standard advice is to use a fully- qualified DTD, I have never heard mention of such a bug. Are you sure that there isn't some other markup error in the Wikipedia pages which is combining to create the effect in IE?
Here's a minimal test case:
http://leuksman.com/misc/with-dtd.html http://leuksman.com/misc/without-dtd.html
It's got a single <div> with the style 'position: absolute' applied.
No problems with IE 5.50.4807.2300IS ...
Paul
A couple days ago I slipped this in. All well and good in Mozilla, but in Internet Explorer 6.0 (I haven't tried 5.x) this triggers a selection bug, such that trying to select text with the mouse selects everything from the beginning of the document to the point where you've got the mouse, instead of the portion of text you're dragging over.
It might be helpful if I point out that I've always seen this weird selection behaviour on Opera 6.05 for Windows, but only while the page is loading. While it's loading, it also does not display scrollbars or let me scroll with the keyboard.
This wouldn't bother me at all, if only there wasn't yet another (probably unrelated) bug that causes pages to finish loading later than necessary. Often, the connection just hangs even though all the page contents have actually been transfered (and Opera displays it all sans scrollbar), but it just waits and waits for ages before it finishes up the page transfer.
(P.S. I'm aware there is a newer version of Opera, but it has even more bugs and I generally don't like it, so I'll stick with 6.05 for the time being.)
Greetings, Timwi
On Mon, 30 Jun 2003 21:44:13 +0200, Timwi timwi@gmx.net gave utterance to the following:
(P.S. I'm aware there is a newer version of Opera, but it has even more bugs and I generally don't like it, so I'll stick with 6.05 for the time being.)
You should at least go to 6.06 - security fix (a real rarity for Opera to need one!).
On Mon, 30 Jun 2003, Timwi wrote:
This wouldn't bother me at all, if only there wasn't yet another (probably unrelated) bug that causes pages to finish loading later than necessary. Often, the connection just hangs even though all the page contents have actually been transfered (and Opera displays it all sans scrollbar), but it just waits and waits for ages before it finishes up the page transfer.
That's not a bug; there are a few operations (updating links and the site stats table w/ the number of page views, etc) which are postponed until after the page is rendered and sent down the pipe, precisely so that if the database is stuck you'll still see the page as soon as possible. The connection is still open because the script hasn't finished; as far as I know there's no way in PHP to close the connection without killing the script.
-- brion vibber (brion @ pobox.com)
Timwi schrieb:
This wouldn't bother me at all, if only there wasn't yet another (probably unrelated) bug that causes pages to finish loading later than necessary. Often, the connection just hangs even though all the page contents have actually been transfered (and Opera displays it all sans scrollbar), but it just waits and waits for ages before it finishes up the page transfer.
I also experience this sometimes, but not often. For a few minutes every new page I open it loaded, but the transfer doesn't stop. (Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.3) Gecko/20030312)
Kurt
wikitech-l@lists.wikimedia.org