[Dojo-checkins] [dojo] #9447: test_FocusManager save bookmark broken in Safari (was: test_FocusManager save bookmark broken in Safari 4)

dojo trac at dojotoolkit.org
Tue Jun 30 07:11:34 EDT 2009


#9447: test_FocusManager save bookmark broken in Safari
----------------------+-----------------------------------------------------
 Reporter:  haysmark  |        Owner:  bill    
     Type:  defect    |       Status:  assigned
 Priority:  normal    |    Milestone:  1.4     
Component:  Dijit     |      Version:  1.3.1   
 Severity:  normal    |   Resolution:          
 Keywords:            |  
----------------------+-----------------------------------------------------
Changes (by bill):

  * status:  new => assigned
  * milestone:  tbd => 1.4


Comment:

 The bookmark returned in that test file is broken on all browsers... I
 think it only works when getFocus() is called programatically, not when
 the user needs to press a button.

 The issue is that merely pressing the "Save focus/selection state" button
 removes focus from the previously-focused <input>/<textarea>, and thus de-
 selects whatever text was selected.

 As for the node being null, that is a bug, although it also occurs on
 Safari 3.2.1 according to my tests.  It's because pressing the button on
 safari removes focus altogether, which is different than IE, where
 pressing a button makes the button itself gets focus.

 I think I can compensate for safari's different behavior by returning the
 previously focused node if current focus is null... similar to how
 getFocus() returns the previously focused node if the current focus is the
 button.     However, I want to be sure that I don't return a previously-
 previously focused node, in the case where:

   1. user clicks an input
   2. user clicks a blank area of the screen (clearing all focus)
   3. getFocus() is called programatically (perhaps because a Dialog popped
 up and the Dialog wants to know where to return focus to)

-- 
Ticket URL: <http://bugs.dojotoolkit.org/ticket/9447#comment:1>
dojo <http://dojotoolkit.org/>
The Dojo UI Toolkit


More information about the Dojo-checkins mailing list