Multiple crafters mean multiple workshops each with `id="craftWindow"`


#1

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:

  1. Play a game.
  2. Get more than one crafter who has a crafting workshop, such as mason, herbalist, carpenter
  3. 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


#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.


#3

We’ll just have to do $('#craftWindow .' + crafterClass) or something.


#4

I’m not sure how jquery handle those, but default css and js ignores everyone except the first


#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.


#6

I understand :merry:

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.