Skip to content

html-duration-picker.js contains console log #178

Open
@NiekZndt

Description

@NiekZndt

Describe the bug
html-duration-picker.js contains a console log on line 174 in the function insertFormatted. This console log outputs everytime you input a value in the input. This console.log should be removed

  const insertFormatted = (inputBox, secondsValue, dispatchSyntheticEvents, adjustmentFactor = 1) => {
    const hideSeconds = shouldHideSeconds(inputBox);
    const formattedValue = secondsToDuration(secondsValue, hideSeconds);
    const existingValue = inputBox.value;
    // Don't use setValue method here because
    // it breaks the arrow keys and arrow buttons control over the input
    inputBox.value = formattedValue;
    // save current cursor location for automatic increase

    // manually trigger an "input" event for other event listeners
    if (dispatchSyntheticEvents !== false) {
      if (existingValue != formattedValue) {
        inputBox.dispatchEvent(createEvent('change', {bubbles: true, cancelable: true}));
      }
      inputBox.dispatchEvent(createEvent('input'));
    }
    inputBox.setAttribute('data-adjustment-factor', adjustmentFactor);
    console.log({adjustmentFactor}); // <--------------
    highlightTimeUnitArea(inputBox, adjustmentFactor);
  };

To Reproduce
Steps to reproduce the behavior:

  1. Add the input in an html file
  2. View the console.log for messages coming in

Expected behavior
The console output console log messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions