Codemirror Undo & Redo doesn't work in window 10 for all browsers

Code mirror undo and redo works perfectly on MAC OS for all browsers, but this same thing doesn’t work on IE, chrome, firefox on window 10.

Is there a way to fix this issue ? or code mirror doesn’t support window 10

How are you activating undo/redo? It should definitely work.

this.undoDepth = Infinity;

This will work on MAC on all browsers but not on window 10 any browsers ? may i know the fix please ?

THIS IS FAIL FOR ONLY HTML FILES JS FILES WORKS PERFECT.