Summary:
I’m sorry. This is kind of pedantic.
Discovered because I was relying on the uniqueness of the “craftWindow” id for mod functionality.
Steps to reproduce:
Play a game.
Get more than one crafter who has a crafting workshop, such as mason, herbalist, carpenter
Examine the UI html using the CEF debugger
Expected Results:
html tags with id attributes with unique values
Actual Results:
for each crafter workshop UI, there is a duplicated “craftWindow” and “craftingWindow” ids (may be other ids as well)
Notes
HTML standard says that id
attributes should be unique.
Version Number and Mods in use:
release-874
max99x
July 12, 2018, 12:52am
2
Alas, there have always been dozens of DOM elements with identical IDs in the game UI. I’ve given up on fixing them all.
1 Like
We’ll just have to do $('#craftWindow .' + crafterClass)
or something.
I’m not sure how jquery handle those, but default css and js ignores everyone except the first
max99x
July 12, 2018, 1:31am
5
That may be the standard, but Chrome definitely finds all of them both in CSS and in document.querySelectorAll()
. Otherwise all of the crafting windows (among many other things) would be unstyled and with no functionality.
I understand
Let’s mark this bug report as “won’t fix”.
I’ll use the work-around where one can call self.$('#craftWindow')
from inside the craft window ember view.