fix curtain on iPad with soft keyboard
upgrade code mirror to 3.1