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

divio / django-cms / #28279

04 Jan 2024 10:24AM UTC coverage: 76.775%. Remained the same
#28279

push

travis-ci

web-flow
fix: Incomplete command to create a virtual env in docs

1042 of 1539 branches covered (0.0%)

2519 of 3281 relevant lines covered (76.78%)

32.53 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

© 2026 Coveralls, Inc