ID:2020134
 
Not a bug
BYOND Version:509
Operating System:Windows 10 Home 64-bit
Web Browser:Chrome 47.0.2526.106
Applies to:Webclient
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
<byondclass name="chatbox">

<style>
#chatbox {
width: 200px;
height: 150px;

position: absolute;
top: calc(100% - 150px);
margin: 0px 0px 50px 50px;

background: rgba(0,0,0,0);

z-index: 1;
}

#content {
width: 100%;
}

input[type="text"] { // <-------- Pay attention to this line
width: 100%;
height: 25px;

margin: auto;
border: 1px solid grey;
color: rgb(61, 132, 252);
background-color: rgb(0, 52, 141);
}

.chat-strip {
width: 100%;

}
</style>

<script>
(function() {
var stripColors = ['rgba(20, 107, 255, 0.5)', 'rgba(0, 68, 184, 0.5)'];
var curStrip = 0;

return {
fn: {
output: function(obj) {
if(obj.hasOwnProperty('text')) {
this.ui.content.innerHTML += '<div class="chat-strip" style="background-color:' + stripColors[curStrip] + ';">' + obj.text + '</div>';
if(curStrip < stripColors.length - 1) {
curStrip++;
} else {
curStrip = 0;
}
}
}
}
};
})()
</script>

<div id="content"></div>
<input id="chat-input" type="text" placeholder="Press enter to chat..." onsubmit="javascript:output(this);return false;" />

</byondclass>

Problem:
- input[type="text"] recognizes the field regardless of if there is an id/class assigned (as it should).
- input[type="text"].chat-input recognizes the field if class is assigned (as it should).
- input[type="text"]#chat-input does not recognize the input field when id is assigned.
The id in an element that's part of a control is stripped out, on the possibility you might have more than one copy. The id is used for filling in the control's ui member.

I would avoid hyphens in IDs to make them easier to work with.
Lummox JR resolved issue (Not a bug)