www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 496507044258fa111c7f4771d3738aa98edb49fc
parent 81a1413d19e16d03021304239bd7dcb792b30790
Author: Davide Cervone <dpvc@union.edu>
Date:   Thu, 23 Sep 2010 11:12:15 +0000

Use onkeypress to force IE to do onchange when RETURN is pressed (resolves bug reproted at https://sourceforge.net/projects/mathjax/forums/forum/948701/topic/3862906)

git-svn-id: https://mathjax.svn.sourceforge.net/svnroot/mathjax/trunk@608 b8fd5906-0fad-46e2-a0d3-10d94ff285d1

Diffstat:
Mmathjax/test/sample-dynamic.html | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/mathjax/test/sample-dynamic.html b/mathjax/test/sample-dynamic.html @@ -50,5 +50,18 @@ Type some TeX code and press RETURN:<br/> You typed: ${}$ </div> +<script> +// +// IE doesn't fire onchange events for RETURN, so +// use onkeypress to do a blur (and refocus) to +// force the onchange to occur +// +if (MathJax.Hub.Browser.isMSIE) { + window.MathInput.onkeypress = function () { + if (window.event && window.event.keyCode === 13) {this.blur(); this.focus()} + } +} +</script> + </body> </html>