Wrong windows capturing gestures

I've got a 2010 Macbook Pro, running Mountain Lion. I have the three-finger swipe left and right set up as forward and backward pages. Recently I've noticed the wrong window is capturing my gestures sometimes. I'm in Firefox right now, with the browser window focused, and the three-finger swipe is flipping between two open documents in TextWrangler. I was wondering what on earth is going on and how I make it stop? I'm not sure if this is a Mountain Lion issue exclusively, but I can't remember it ever happening in Lion or earlier versions of OS X