Remove iFrame Keystrokes Gone

Remove iFrame Keystrokes Gone

I really don't know what to title this question without getting wordy so if a mod has a better idea then PLEASE change the title ...

What I'm Doing

I'm making this online designer where people can add/edit/remove text and images. They can store all of their images in an image basket. Now when they're in the editor I open their image basket using .appendTo() to place a div wrapping and iframe.

Once they make their selection and i capture all the values i need to proceed i use .remove() to totally remove the div wrapper and the iframe from the html.

My Problem

For shortcuts and functionality i am using key commands to do things such as arrow keys to move things. HOWEVER, after after I use the .remove() on the iframe its like my keystrokes no long register. Now if i click on the page again then my keystrokes will start working. Its only directly after i use the .remove() on the iframe that it hiccups on my keystrokes.

It's almost like the browser thinks the iframe is still there and is getting confused about the keystrokes.

anyway...

any and all help would be awesome... please let me know if you need to see some code.