In Internet Explorer 7 (unfortunately I cannot test in IE 6), when I click on LoginToboggan's custom login block Login/Register link, the blocks un-collapses, I get access to the form, then a couple of seconds afterwards, the block disappears, and the login page is opened http://www.myWebSite.com/user/login. If you start typing in the fields, you have to retype again.

Comments

Chill35’s picture

Title: Internet Explorer redirects from block to page » Internet Explorer redirects from block to page (and after login you are redirected to user account page)

In Firefox, all is well.

Something else : in Internet Explorer 7, after you're logged in (from the login PAGE, after the strange disappearance of the LoginToboggan's custom block's form), you are not returned to the original page you were on, as you should : you are redirected to your account page.

Chill35’s picture

$pre = '<div id="toboggan-container" class="toboggan-container">';
  $pre .= '<div class="toboggan-login-link">';
  $pre .= l(t('Login/Register'), 'user/login', array('onclick' => "toggleboggan('toboggan-login');this.blur();return false;"));
  $pre .= '</div>';

Is it possible that IE 7 does not deal well with "return false;" ? That the link ('user/login') is followed after the Javascript function is invoked ?

Chill35’s picture

Actually there's a new bug in IE 7.

I noticed the problem in collapse.js : the href of the fieldset was set to "#" and the onclick event was set to false, after a couple of functions had been invoked. Normally the "#" would not be followed. It should not. But it is, after the other functions are invoked. In IE 7.

My temporary fix was to remove that href attribute and make the fieldset "clickable" (with the cursor...) using CSS.

Chill35’s picture

I have a very brutal fix.

Can someone create a patch, please ?

Replace this line :

$pre .= l(t('Login/Register'), 'user/login', array('onclick' => "toggleboggan('toboggan-login');this.blur();return false;"));

With this one :

$pre .= l(t('Login/Register'), 'user/login', array('onclick' => "toggleboggan('toboggan-login');this.removeAttribute(\"href\");return false;"));

This fix is ugly and brutal but it works in Firefox and IE 7. Can someone test it in IE 7 (with and without this modification) ?

Thanks.

Chill35’s picture

Title: Internet Explorer redirects from block to page (and after login you are redirected to user account page) » Cannot use the custom LoginToboggan block in Internet Explorer 7
Chill35’s picture

Trouble with this, though, is that you lose the "pointy" cursor.

My solution is this line :

$pre .= l(t('Login/Register'), 'user/login', array('onclick' => "toggleboggan('toboggan-login');this.className = \"clickable\";this.removeAttribute(\"href\");return false;"));

In my css file, the class "clickable" makes the cursor pointy.

Chill35’s picture

This article explains the ins and outs of this bug introduced in IE 7 : http://www.11heavens.com/IE7-bug-report-onclick-event-handler

Caroline

hunmonk’s picture

Status: Active » Postponed (maintainer needs more info)

i am unable to reproduce this problem with either drupal 4.7 or 5, using the latest version of IE 7. please investigate and if it is indeed fixed, then close this issue.

hunmonk’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

apparently it's not a problem anymore.