Handle button press event only when appropriate.
Handle button press event only when appropriate.

Merge branch 'rust-servo'