Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle events without deprecated keyCode property #5543

Merged
merged 1 commit into from
May 8, 2024
Merged

Conversation

nightwing
Copy link
Member

@nightwing nightwing commented May 2, 2024

fixes #4952

I have verified that list of keys have not changed as a result of this pull request, by running the following in browser console and comparing output with the version before this pull request

          q = require("ace/lib/keys");
          delete q.default;
          delete q.$codeToKeyCode;
          var sortByKeys = function(obj) {
                if (!obj || typeof obj != "object" || Array.isArray(obj)) {
                    return obj;
                }
                var sorted = {};
                Object.keys(obj).sort().forEach(function(key) {
                    sorted[key] = sortByKeys(obj[key]);
                });
                // assert(_.isEqual(obj, sorted));
                return sorted;
            };
             JSON.stringify(sortByKeys(q))

Copy link

codecov bot commented May 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.66%. Comparing base (6a26b27) to head (0a610db).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5543   +/-   ##
=======================================
  Coverage   86.65%   86.66%           
=======================================
  Files         593      593           
  Lines       42873    42898   +25     
  Branches     7123     7125    +2     
=======================================
+ Hits        37151    37176   +25     
  Misses       5722     5722           
Flag Coverage Δ
unittests 86.66% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@InspiredGuy InspiredGuy merged commit 7591120 into master May 8, 2024
3 checks passed
@InspiredGuy InspiredGuy deleted the fix-keyCode branch May 8, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

keybindings: Ace is relying on deprecated keyCode KeyboardEvent property
4 participants