I am trying to use an action on a select component on Ember 3.15.
<select id=“select” {{on “click” this.selected}}>
– Select One –
and in the component action:
@action
selected() {
let x= 3;
}
applying a break point in the action crashes chrome but works fine in firefox. with error
Aww snap : "Dev tools disconnected from page …"
Same test with a button works fine.
Is this normal or am I doing something wrong? Is this Ember issue or Chrome issue?
Updated to latest version of chrome today version: 80.0.3987.116 and issue persist
The first thing I would check is whether this still happens in a completely plain browser session with no extensions. I would be especially suspicious that this could be an issue in the ember inspector.
Thank you guys for your comments.
Meanwhile the issue persists, I still cannot figure out why it is crashing in Chrome. A fresh install of Chrome without any addons also crashes.
I am using pure html select so I don’t think it should be CapitalCase. At least the linter would complain about that.
and the action looks like this
@action
selected(question, event) {
try {
console.log("adass");
event.preventDefault();
// set(question, "answer", event.target.value)
// this.eval_rules(question);
} catch(e) {
console.log(e);
}
}
Sorry I wish this editor can format code. I am using something like this: HTML select tag. i noticed this editor is removing some content from my code.
Anyways, Ive tried everything removing all the variables and issue persist.
every thing works fine unless I put a break point in the action. then it crashes.
If I dont apply a break point, then Chrome is fine.
Also in firefox, if I apply a break point, it works fine.
Using same action on a html button works fine as well. It is very strange, never seen anything like this before.