fixing bug in buttons with dropdown attribute, improving textarea code