8000 [FireMonkey] setting keyMaps using CodeMirror advanced options no longer works · Issue #495 · erosman/support · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[FireMonkey] setting keyMaps using CodeMirror advanced options no longer works #495
Closed
@Jontron123

Description

@Jontron123

In version 2.57, setting keyMaps in the CodeMirror section of the advanced settings no longer works. In the browser console I found the following error:

Uncaught TypeError: next is undefined [fm-codemirror.js:7764:11](moz-extension://d7caabfe-f9ab-4284-bc29-f880bbff49fc/lib/codemirror/fm-codemirror.js)

I was able to fix this error by changing the the function "getKeyMap" in "fm-codemirror.js" to:

  function getKeyMap(val) {
    if(typeof val == "string" && keyMap[val]){
      return keyMap[val];
    } else {
      return val;
    }
  }

Then there was another error:

‘src’ attribute of <script> element is empty. [options.html:72:1](moz-extension://d7caabfe-f9ab-4284-bc29-f880bbff49fc/content/options.html)

The keyMap script src was getting updated after the page loaded with the proper javascript location, but the keymap script was still not being loaded. After looking at the changes between v2.56 an v2.57 I found that I was able to edit the file "options.html" and changed:

    <!-- Key Maps -->
    <script id="keyMap" src=""></script>

to:

    <!-- Key Maps -->
    <script id="keyMap"></script>

After making these changes, everything is working correctly again. I don't know if these are the best ways to fix this issue, but this seems to be working fine for me.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0