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

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

Open
NiekZndt opened this issue Nov 16, 2023 · 0 comments
Open

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

NiekZndt opened this issue Nov 16, 2023 · 0 comments

Comments

@NiekZndt
Copy link

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.

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

No branches or pull requests

1 participant