Changeset 3671

Show
Ignore:
Timestamp:
07/01/07 16:51:15 (1 year ago)
Author:
timothy
Message:

More tweaks to the Web Interface for iPhone. Now the input field works after you send a message.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Plug-Ins/Web Interface/Resources/iphone/iphone.js

    r3670 r3671  
    446446DirectChatPanel.prototype.send = function() { 
    447447        this.sendMessage(this.panelInputElement.value); 
    448         this.panelInputElement.value = ""; 
     448 
    449449        this.panelInputElement.focus(); 
    450         this.panelInputElement.selectionStart = 0; 
    451         this.panelInputElement.selectionEnd = 0; 
     450 
     451        var valueLength = this.panelInputElement.value.length; 
     452        this.panelInputElement.selectionStart = valueLength; 
     453        this.panelInputElement.selectionEnd = valueLength; 
     454 
     455        for( var i = 0; i < valueLength; ++i) 
     456                document.execCommand("delete"); 
    452457} 
    453458 
     
    457462 
    458463                this.panelInputElement.focus(); 
    459                 this.panelInputElement.selectionStart = 0; 
    460                 this.panelInputElement.selectionEnd = 0; 
     464 
     465                var valueLength = this.panelInputElement.value.length; 
     466                this.panelInputElement.selectionStart = valueLength; 
     467                this.panelInputElement.selectionEnd = valueLength; 
    461468        } else { 
    462469                this.panelTranscriptElement.style.height = null;