Jump to content
Sign in to follow this  
lynkfs@gmail.com

Navigation issue in IE10

Recommended Posts

Hi

I have a navigation issue using internet explorer (10)

The following code works fine in chrome, safari, firefox on desktop (win,mac) and mobile (apple,android)

It does NOT work however in IE

 

I'm navigating from Form1 to Form2, which works as expected :

 

 
procedure TForm1.InitializeObject; 
begin 
  inherited; 
  {$I 'Form1:impl'} 
  W3Image6.OnClick := 
    procedure (Sender: TObject) 
    begin 
      Application.GotoForm('Form2',feFromRight); 
    end; 

 

But navigating back from Form2 to Form1 doesn't work in IE10 (but does work in all other browsers)

 
procedure TForm2.InitializeObject; 
begin 
  inherited; 
  {$I 'Form2:impl'} 
  W3HeaderControl1.BackButton.OnClick := 
  procedure (Sender: TObject) 
    begin 
      Application.GotoForm('Form1',feToLeft); 
  end; 

 

I've tried to use a normal button onclick like below with the same results

 
  W3Button1.OnClick := 
  procedure (Sender: TObject) 
    begin 
      Application.GotoForm('Form1',feToLeft); 
    end; 

 

Please have a look at this as my users must be able to use IE

 

Cheers

 

Nico

Share this post


Link to post
Share on other sites

Hm. We have been digging deep to figure this out, but it seems like IE isn't behaving the way it should in this case. The problem is related to prefixes in the CSS.

 

In the in ´W3Effects´ unit you'll find the ´TW3CustomAnimation.SetupTransition;´ at line 427.

 

The line ´FInEvName := 'animationend';´ is setting up a listener that should trigger the "tear-down" event after the animation (moving of forms).

 

We have to investigate this a bit more to figure out how we can fix this.

 

In the mean time, the best workaround you can implement is to skip the transition in IE.

 

This is simply done by using "feNone" when IE is involved:

 

 
W3Image6.OnClick := 
    procedure (Sender: TObject) 
    begin 
      if w3_getIsInternetExplorer then 
        Application.GotoForm('Form2',feNone) 
      else 
        Application.GotoForm('Form2',feFromRight); 
    end; 

 

 

You have to to this for all transitions - even if it seams like the first transition is working properly. It is this transition that causes trouble for the the second one. (The second transition wont start because the first transition never clears the "in transition" flag).

 

Sorry.

 

(OTOH, it might be discussed if such transitions really are appropriate in desktop environments, or if these should be used in mobile environments alone. Most web apps would normally use a plain "back" feature, and not any transition when moving between pages/forms.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×