creativetimofficial / ct-material-dashboard-pro

Material Dashboard Pro - Premium Bootstrap 5 Admin
https://demos.creative-tim.com/material-dashboard-pro/pages/dashboards/analytics
116 stars 28 forks source link

[Bug] onkeyup can't be used #322

Open liemteksun opened 2 years ago

liemteksun commented 2 years ago

Version

3.0.1

Reproduction link

https://osplit.com/s/material-dashboard-pro-html-v3.0.1/pages/ecommerce/products/keyup.html

Operating System

Linux

Device

Chrome

Browser & Version

Chrome 94

Steps to reproduce

If you type something on the name input field, there won't be anything on the javascript console ( even when I have this code on the input field - onkeyup="console.log('key up')" )

Removing makes the onkeyup to work again

I think this has to do with my other issue (#317)

On material dashboard v 2.1.2, I can use onkeyup, but now I couldn't

I hope solving issue #317 will solve this as well

What is expected?

onkeyup binding to work

What is actually happening?

the 'onkeyup' is attached to this function

inputs[i].onkeyup = function(e) {
  if (this.value != "") {
    this.parentElement.classList.add('is-filled');
  } else {
    this.parentElement.classList.remove('is-filled');
  }
};

Solution

Additional comments

groovemen commented 2 years ago

Hello @liemteksun,

Sorry for this late response, I have added this issue to be solved into the next product update. All the best, Stefan

liemteksun commented 2 years ago

I appreciate the update thanks

liemteksun commented 2 years ago

I see that there are 2 minor releases since I open this issue, but I still can't use the onkeyup - when is this going to make it to the release? I think most of my bugs are not in the new release yet :(

thanks