JavaScript javascript stopPropagation not working on input field javascript stoppropagation not working,javascript stoppropagation not working in firefox,

Have a simple div array with values that the user will choose from and an "other" field where they can put in their own number. I have a clearing div (lower right) that will clear the selection and input field; however, I also want to have a click event on the containing div as well.

I've searched and nothing seems to do the trick, the one that comes close is using stopPropagation so the click on a div doesn't trigger the containing div's script. It's working on all the divs but for some reason isn't working on the input field. everytime i click the number scrubber or try typing in the field it calls the reset script of the containing div. Is there something about an input field that causes the stopPropagation to not work? or am i missing something. None of the other things i found seemed to solve it.

HTML

<div id="don_options">
    <div class="group">
        <div class="col"><span class="don">xxx</span></div>
        <div class="col"><span class="don">xxx</span></div>
        <div class="col"><span class="don">xxx</span></div>
    </div>

    <div class="group">
        <div class="col"><span class="don">xxx</span></div>
        <div class="col"><span class="don">xxx</span></div>
        <div class="col"><span class="don">xxx</span></div>
    </div>

    <div class="group">
        <div class="col"><span class="don">xxx</span></div>
        <div class="col"><span class="don">xxx</span></div>
        <div class="col"><span class="don">xxx</span></div>
    </div>

    <div class="group">
        <div class="col"><span class="don">Other</span><br class="mobile"><input id="other" name="other" type="number" min="3" step=".01" value="" size="25" maxlength="255" class="form-text2" placeholder="Other"></div>
        <div class="col">&nbsp;</div>
        <div class="col"><span class="don">Clear</span></div>
    </div>
</div>

Javascript

$('#don_options').on('click', function(e) {
    resetDon();
});

$('.don').on('click', function(e) {
    e.stopPropagation(); // stop bubbling to parent element
    //e.preventDefault();
    //e.cancelBubble = true;
    //e.stopImmediatePropagation();

    //lots of buttonesk goodness here
});

$('#other').on('keyup change click', function(e) {
    e.stopPropagation(); // stop bubbling to parent element
    //e.preventDefault();
    //e.cancelBubble = true;
    //e.stopImmediatePropagation();

    //more goodness here for the input field
});

function resetDon() {
    //clear "buttons" here
}

Adding a quick screenshot for visual. Black box is the containing div enter image description here

Answer:1

How do you modify the function below to make the second parameter optional? TypeScript: function getName(name: string, { lastName }: { lastName: string }) { // ... } getName('John'); /...

How do you modify the function below to make the second parameter optional? TypeScript: function getName(name: string, { lastName }: { lastName: string }) { // ... } getName('John'); /...

I have a a component that needs to check for multiple options and return based on those options. Therefore I have created an outside function that is called in my component return statement to ...

I have a a component that needs to check for multiple options and return based on those options. Therefore I have created an outside function that is called in my component return statement to ...

  1. return from function python
  2. return from function bash
  3. return from function javascript
  4. return from function matlab
  5. return from function r
  6. return from function powershell
  7. return from function vba
  8. return from function ruby
  9. return from function in shell script
  10. return from function rust
  11. return from function gdb
  12. return from function lisp
  13. return from function c
  14. return from function golang
  15. return from function kotlin
  16. return from function js
  17. return from function php
  18. return from function elixir
  19. return from function java
  20. return from function react

I have a Web API and I'm trying to get JSON Data from it by using Vue, but I get neither data or errors, so I don't what is wrong. I want to load the data when the page is loaded. Here is my code: ...

I have a Web API and I'm trying to get JSON Data from it by using Vue, but I get neither data or errors, so I don't what is wrong. I want to load the data when the page is loaded. Here is my code: ...

  1. fetch data with react hooks
  2. fetch data with react
  3. fetch data with axios
  4. fetch data with javascript
  5. fetch data with redux
  6. fetch data with ajax
  7. fetch data with redux thunk
  8. fetch data with mysqli php
  9. fetch data with ajax in php
  10. fetch data with usereducer
  11. fetch data with pdo
  12. fetch data with jquery
  13. fetch data with redux saga
  14. fetch data with react redux
  15. fetch data with php
  16. fetch data with json
  17. fetch data with angular
  18. fetch data with post
  19. fetch data with jquery ajax
  20. fetch data with sql

I am facing a little problems with using Custom Palettes with Angular Material Framework. I still not understand myself to use custom theme. In angular config file. $mdThemingProvider.definePalette('...

I am facing a little problems with using Custom Palettes with Angular Material Framework. I still not understand myself to use custom theme. In angular config file. $mdThemingProvider.definePalette('...