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

kommitters / editorjs-toggle-block / 10856842690

13 Sep 2024 10:17PM UTC coverage: 31.442% (-0.7%) from 32.139%
10856842690

Pull #242

github

web-flow
Merge c2da1ab21 into 152a5cd00
Pull Request #242: General decoupling in functions

77 of 370 branches covered (20.81%)

Branch coverage included in aggregate %.

95 of 477 new or added lines in 22 files covered. (19.92%)

3 existing lines in 1 file now uncovered.

250 of 670 relevant lines covered (37.31%)

29.51 hits per line

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

0.0
/src/nest/setEventsToNestedBlock.js
1
 /**
2
   * Sets the events to be listened through the holder
3
   * in a nested block.
4
   *
5
   * @param {KeyboardEvent} e - key down event
6
   */
7
 export function setEventsToNestedBlock(e) {
NEW
8
    if (e.code === "Enter") {
×
NEW
9
      setTimeout(() => this.createParagraphFromIt());
×
10
    } else {
NEW
11
      const indexBlock = this.getCurrentBlockIndex();
×
NEW
12
      const nestedBlock = this.getBlockByIndex(indexBlock);
×
NEW
13
      const { holder } = nestedBlock;
×
14

NEW
15
      if (e.code === "Tab" && e.shiftKey) {
×
NEW
16
        this.extractBlock(indexBlock);
×
17
      }
NEW
18
      if (e.code === "Backspace") {
×
NEW
19
        const cursorPosition = document.getSelection().focusOffset;
×
NEW
20
        this.removeBlock(holder, nestedBlock.id, cursorPosition);
×
21
      }
22
    }
23
  }
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