During a recent instrument flight (KMRB ILS-26) I was using ForeFlight on my iPad and ran into a little problem that caused me to lose my situational awareness.  I was flying the MRB transition (053 radial to intercept the localizer).  I was under the hood and had had moderate winds the entire 1.8 hour flight.  I generally use the FF 'lock' button on the approach plate display but had not done that this time.  At some point in the transition I must have touched the iPad screen because just short of the localizer I looked down and saw that I was no longer on the approach plate display and instead had gone to the 'more' tab.  I was completely flummoxed at this point and started fumbling around trying to get back to the plate.  I blew through the localizer and had no excuse.  Had this been the practical test I would have failed with a big 'F'.  As with all others this flight was a learning experience in a couple of areas.  The first is of course "always fly the airplane" and the second is the awareness that your technology (EFB or panel) could fail you or potentially do something unexpected at anytime.  You should not only be aware of what you are supposed to be doing now but also what is coming next.  If you get used to being to glance at a plan or approach plate for the next thing to do you might get surprised when it is not there.  I also intend to make sure that my personal check list includes 'hit the lock button' on the approach plate for IFR from now on.