ipython-contrib / jupyter_contrib_nbextensions

A collection of various notebook extensions for Jupyter
http://jupyter-contrib-nbextensions.readthedocs.io/en/latest
Other
5.22k stars 806 forks source link

hinterland doesn't work properly in safari #1419

Open PatZhuang opened 5 years ago

PatZhuang commented 5 years ago

I think there might be some animation or key event issues for hinterland in Safari.

When I enable hinterland and type the first character, the completion cell pops up, but nothing happens when I continue typing, the completion cell just not updates. I checked the logs and it seems like the rest of the key presses after the first one didn't trigger the update function at all, the matches array was logged only once.

I didn't come across the same issue in Chrome btw.

PatZhuang commented 5 years ago

I checked the console again and I think this is an KeyboardEvent.keyCode issue.

For example, in safari, the keyCode of character 'i' has the value of 229 in safari and 73 in Chrome. Actually it seems all the characters have the same KeyboardEvent.keyCode value of 229 in safari, which could fail some expressions or indexings in codemirror.js file.