Get correct mouse position in chrome and firefox