Jump to content


Photo

Navigation issue in IE10


  • Please log in to reply
1 reply to this topic

#1 Nico Wouterse

Nico Wouterse
  • Moderators
  • 249 posts
  • LocationAustralia

Posted 28 May 2013 - 06:23 AM

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

#2 Jørn E. Angeltveit

Jørn E. Angeltveit
  • Administrators
  • 297 posts
  • LocationNorway

Posted 04 June 2013 - 06:48 PM

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.)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users