If user begins writing message, textarea height becomes 2px. That happens only in IE7. Problem is in qtc.js script - it sets css height to 2px of lowerHeight, in function checkChatBoxInputKey.

---

Code source (line 781-783):

if (crossScrollHeight(chatboxtextarea) < variableHeight) {
lowerHeight = (crossScrollHeight(chatboxtextarea) + 4) - baseHeight;
variableBoxContentHeight = baseBoxContentHeight - (crossScrollHeight(chatboxtextarea) + 4) + (baseHeight * 2);

Code replacement:

if (crossScrollHeight(chatboxtextarea) < variableHeight) {
lowerHeight = (crossScrollHeight(chatboxtextarea) + 4) - baseHeight;
if (lowerHeight<18)lowerHeight=18;
variableBoxContentHeight = baseBoxContentHeight - (crossScrollHeight(chatboxtextarea) + 4) + (baseHeight * 2);

CommentFileSizeAuthor
qtc.zip7.49 KBmangru

Comments

moosh101’s picture

Hi

I am having this issue too with IE9, but the patch does not seem to work. When a user starts to type a message in the chat window, the text field shrinks to 2px and is impossible to see.

mangru’s picture

I do not have IE9 to check, but it can be "lowerHeight" is undeffined or very small. You can check value with developer tools (or alert) and do changes according to results (I guess it will be in same lines I wrote)

chintan4u’s picture

hi mangru,
Applied ur patch for IE 7 but still not relief from this bug....

poli’s picture

Always present yes indeed tested on IE and Opera. Damage, the patch is not working

huaxiufeng’s picture

I am a green hand to drupal. In my project, it happens in qtc.min.js script. Since all the code in this file are written in one line. I formatted the code in file and try to find why the textarea become 3px in IE.

The error happens in function checkChatBoxInputKey(b, c, d, e, f) , the "if (crossScrollHeight(c) < i)" clause.

if (crossScrollHeight(c) < i) { /* in ie crossScrollHeight(c) is 17px and i is 18 */
k = (crossScrollHeight(c) + 4) - j; /* k is 3 after this */
m = l - (crossScrollHeight(c) + 4) + (j * 2);
$(c).css('height', k + 'px');
$("div#chatbox_" + d + " .chatboxcontent").height(m);
if (crossScrollHeight(c) < 54) {
$(c).css('overflow', 'hidden')
}
}

I commented the code in the "if" clause. Provisionally, it works OK. I am not sure whether it will effect somewhere else.
Hope someone can solve the bug!