Selection of comment text in IE broken. (Fix Inside)

ruthsarian - February 1, 2006 - 14:55
Project:Drupal
Version:4.7.0-beta5
Component:base system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Trying to select text within comments to a forum thread does not work under IE. To replicate this bug view any forum thread (such as http://drupal.org/node/44934) and try to highlight text within user comments using IE. You won't be able to or you'll only be able to select the entire block.

This is a bug in IE, not Drupal or the forum system. However there is a workaround that needs to be applied at the base system.

The root cause here is how IE handles the BASE tag. This bug pops up only when viewing a page that puts IE into standards mode. A quirks-mode page will not have this bug. The fix is to insert a closing BASE tag into the HTML. But a closing base tag is invalid HTML 4 (it's valid XHTML). So to work around that we can use IE conditional comments. It keeps the markup HTML 4 and XHTML valid and resolves this issue.

The new BASE tag generated by Drupal should look something like this:

<base href="http://drupal.org/"><!--[if IE]></base><![endif]-->

This fix does not put IE into quirks mode. This fix has no impact on other browsers.

#1

killes@www.drop.org - February 1, 2006 - 15:06
Status:active» fixed

This is fixed in the cvs version by removing the base href tag. I don't think we will commit your suggested fix for the 4.6 branch.

#2

Anonymous - February 15, 2006 - 15:31
Status:fixed» closed

#3

Nilard - March 4, 2006 - 15:35
Version:» 4.6.5

Hey, wait!
By removing the BASE tag you broke all the 'path/to/file' URLs on pages! Now we have to replace all of them with '/path/to/file', it's troublesome.
And if I have base like 'http://www.exampe.com/~user' what should I do now?
We DO need the BASE tag and we can't refuse it!

#4

Nilard - March 4, 2006 - 15:38
Version:4.6.5» 4.7.0-beta5
Status:closed» active

Hey, wait!
By removing the BASE tag you broke all the 'path/to/file' URLs on pages! Now we have to replace all of them with '/path/to/file', it's troublesome.
And if I have base like 'http://www.exampe.com/~user' what should I do now?
We DO need the BASE tag and we can't refuse it!

#5

chx - April 20, 2006 - 18:54
Status:active» fixed

I saw Steven commiting something to help with the IE selection issue. Base issue update is also commtited.

#6

Anonymous - May 4, 2006 - 19:01
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.