Underscore changes to Dash


#1

Hi not sure if this is a bug or not as I can’t lock down the behaviour.
When I give a ID to a select item in some cases it changes an underscore “_” to a dash “-”.
It is not immediate, Blocs accepts the name then I move away and come back to find it has changed.
Other times it tells me the ID is already in use although it hasn’t been used.
This doesn’t occur for all selects in the page, just picks one or two and refuses to allow an underscore.
I noticed the behaviour in bloc2 and has continued in 3.
Annoying as I have javascript events coded to the name and then waste time debugging.


#2

I have the same issue! No takers?


#3

Hi @andrewc & @Murgen,

To my knowledge Blocs currently does a few things. It changes ID’s and Class names to all lowercase vs allowing camelCase in case you happen to be trying to use that. It also does not see the difference between a hyphen and underscore and thinks it is the same and already in use (some-id / some_id). But does allow it for classes (someclass, some-class, some_class). So be mindful of the naming of ID selectors across your project until these issues are resolved. Naming conventions can be a topic unto themselves including various debates.

#bug #wish-list - I think this was brought to the attention of @norm previously.