You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Ilaya and thank you very much for you fantastic work on
javascript.info and your positive impact on my learning javascript
and web development. Truly, your site is the very best from what I have seen
till now. My hope is that you will continue with this wonderful project into
the future.
Below I'm suggesting a correction to the task. In Mouse events basics section
and Selectable list task your solution has a bug. The bug: using Ctrl first
select few lines; next release Ctrl and select/unselect one line. Now you
should see what is happening: the lines are not unselected the same way as you
are clicking.
May I suggest this solution, which to my best knowledge is working very well (the head and body are same/unchanged):
<script>
ul.onmousedown = function(event)
{
return false;
}
ul.onclick = function(event)
{
if (event.ctrlKey)
{
event.target.classList.toggle('selected');
}
else
{
for (let li of ul.querySelectorAll('li'))
{
li.classList.remove('selected');
}
event.target.classList.add('selected');
}
}
</script>
PS: I've posted this comment on Disqus site gives me terrible problems e.g. my comments don't show up on javascript.info. Also I cannot follow over people comments on Disqus. I've checked my settings with Disqus, but it's simply not working well. Hence, I'm double posting it this time. Other than that: thank you Ilaya for
javascript.info
PSS: Just to let you know that I've placed earlier 9 comments in Disqus (on javascript.info) but not even one has appeared on Disqus.
The text was updated successfully, but these errors were encountered:
Hello Ilaya and thank you very much for you fantastic work on
javascript.info and your positive impact on my learning javascript
and web development. Truly, your site is the very best from what I have seen
till now. My hope is that you will continue with this wonderful project into
the future.
Below I'm suggesting a correction to the task. In Mouse events basics section
and Selectable list task your solution has a bug. The bug: using
Ctrl
firstselect few lines; next release
Ctrl
and select/unselect one line. Now youshould see what is happening: the lines are not unselected the same way as you
are clicking.
May I suggest this solution, which to my best knowledge is working very well (the
head
andbody
are same/unchanged):PS: I've posted this comment on
Disqus
site gives me terrible problems e.g. my comments don't show up on javascript.info. Also I cannot follow over people comments onDisqus
. I've checked my settings withDisqus
, but it's simply not working well. Hence, I'm double posting it this time. Other than that: thank you Ilaya forjavascript.info
PSS: Just to let you know that I've placed earlier 9 comments in Disqus (on javascript.info) but not even one has appeared on Disqus.
The text was updated successfully, but these errors were encountered: