• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

divio / django-cms / #30165

24 Nov 2025 09:09AM UTC coverage: 75.132% (-14.8%) from 89.964%
#30165

push

travis-ci

web-flow
Merge 15cfc2db1 into 1e8a3f9c7

1079 of 1626 branches covered (66.36%)

2568 of 3418 relevant lines covered (75.13%)

26.23 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

62.5
/cms/static/cms/js/modules/keyboard.js
1
import keyboard from 'keyboardjs';
2
import $ from 'jquery';
3

4
/**
5
 * @function override
6
 * @private
7
 * @param {Function} originalFunction to override
8
 * @param {Function} functionBuilder function that accepts a function to wrap
9
 * @returns {Function}
10
 */
11
function override(originalFunction, functionBuilder) {
12
    var newFn = functionBuilder(originalFunction);
1✔
13

14
    newFn.prototype = originalFunction.prototype;
1✔
15
    return newFn;
1✔
16
}
17

18
/**
19
 * Override keyboardjs methods to disallow running callbacks
20
 * if input is focused
21
 */
22
keyboard._applyBindings = override(keyboard._applyBindings, function(originalBind) {
1✔
23
    return function(event) {
1✔
24
        if ($(':focus').is('input, textarea, select, [contenteditable]')) {
×
25
            return true;
×
26
        }
27

28
        originalBind.call(this, event);
×
29
    };
30
});
31

32
export default keyboard;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc