Closed Bug 147668 Opened 22 years ago Closed 13 years ago

pagenet.com - javascript not picking up focus change event onblur for textarea

Categories

(Tech Evangelism Graveyard :: English US, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: jim.spam, Unassigned)

References

()

Details

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc3) Gecko/20020523

Focus change away the Message textarea should result in call to the onblur
function defined.
Browser, not engine ---> Event Handling
Here is the <textarea> involved:

<textarea name="message" rows="5" cols="40" align="middle" wrap="soft"           
          onfocus="count_text(this.value)" onchange="count_text2(this.form)"           
          onblur="timer_stop()">
</textarea>


where we have:


//-------------------------------------------------------------
// The actual subroutine that starts the counter.  		        
//-------------------------------------------------------------
function timer_start() {    									    
  running = true  
  now = new Date()        							        	    
  now = now.getTime()  
									            
  if (is_message){   									                
    endTime = now + (counter_speed_short * 0.1 * 1)  
  }
  else {  									                
    endTime = now + (autotab_speed_short * 0.1 * 1)  								          
  }
									          
  show_timer()
}
        
				        				
//-------------------------------------------------------------
//The actual subroutine that stops the counter.  			        
//-------------------------------------------------------------
function timer_stop() {        
  clearTimeout(timerID)   
  running = false
}
Assignee: rogerl → joki
Component: JavaScript Engine → Event Handling
QA Contact: pschwartau → rakeshmishra
Confirming bug with Mozilla trunk binary 20020520xx on WinNT.
In IE6, I can type something in the textarea and then switch
focus to another input, for example, "Character Count"

Whereas in Mozilla, focus keeps returning to the textarea.
James, is that what you meant?

Please respond by going to the URL for this 
bug: http://bugzilla.mozilla.org/show_bug.cgi?id=147668,
entering comments into the "Additional Comments" box,
and hitting the "Commit" button. Thanks -
Status: UNCONFIRMED → NEW
Ever confirmed: true
Yes.  This is exactly what's happening.  The onblur event function should be
called to clear the timer.  If the timer is allowed to expire then the focus is
placed back in the message textarea.  This works in Netscape 4.79 as well as IE6.
QA Contact: rakeshmishra → trix
.
Assignee: joki → saari
QA Contact: trix → ian
I'm seeing exponential growth in number of timers.... Basically, the onchange is
triggering code on the page that seems to set a new timer without clearing the
old one, and then timer_stop can never get rid of the old timer.
Keywords: qawanted
The "message" textarea has onfocus="count_text(this.value)"
the code in show_timer() that eventually does something (when the timeout is
reached) effectively does this:

document.Form1.counter.focus();  // blurs textarea                             
                                                            
document.Form1.message.focus();  // focuses textarea ==> new timeout
count_text(document.Form1.message.value);  // another timeout

hence exponential growth.  I really have no idea why it's blurring/focusing the
textarea.  It's in a non-MS UA if block.

==> Tech Evang
Assignee: saari → english-us
Component: Event Handling → English US
Keywords: qawanted
OS: Windows 2000 → All
Product: Core → Tech Evangelism
QA Contact: ian → english-us
Hardware: PC → All
Summary: javascript not picking up focus change event onblur for textarea → pagenet.com - javascript not picking up focus change event onblur for textarea
Version: Trunk → unspecified
INCOMPLETE due to lack of activity since the end of 2009.

If someone is willing to investigate the issues raised in this bug to determine whether they still exist, *and* work with the site in question to fix any existing issues, please feel free to re-open and assign to yourself.

Sorry for the bugspam; filter on "NO MORE PRE-2010 TE BUGS" to remove.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INCOMPLETE
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.