[mapguide-trac] #5: Bug in Firefox? after onclick event mapviewer go up. (Digitalizing and Readlining function)

MapGuide Open Source trac_mapguide at osgeo.org
Wed Feb 28 03:49:11 EST 2007


#5: Bug in Firefox? after onclick event mapviewer go up. (Digitalizing and
Readlining function)
------------------------------------------+---------------------------------
 Reporter:  maciej.skorczewski at procad.pl  |         Owner:  anonymous
     Type:  defect                        |        Status:  closed   
 Priority:  medium                        |     Milestone:  1.2      
Component:  AJAX Viewer                   |       Version:  1.1.0    
 Severity:  major                         |    Resolution:  fixed    
 Keywords:                                |   External_id:  911499   
------------------------------------------+---------------------------------
Changes (by anonymous):

  * status:  assigned => closed
  * component:  Viewer API => AJAX Viewer
  * resolution:  => fixed

Comment:

 PATCH: after onclick event mapviewer    go up. (Digitalizing and
 Readlining function).[[BR]]
 [[BR]]

 The problem here is how Firefox handles the focus event. If you have a
 look a
 the StartDigitizing() function in ajaxmappane.templ you will notice that
 at
 the end of the function a line like this:[[BR]][[BR]]



 document.getElementById("KeyTarget").focus();[[BR]]


 This ensures that the input "KeyTarget" captures the key pressed by the
 user. It seems that FF forces a minimum height when focusing this
 input.[[BR]]
 [[BR]]


 What worked for me was making it invisible, but only in non IE browsers
 (IE
 6 doesn't allow focus on hidden objects). For instance, in the
 InitDocument() function you could use something like:[[BR]]
 [[BR]]


     if(!msie)  document.getElementById("KeyTarget").style.display =
 "none";[[BR]]
 [[BR]]

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/5#comment:4>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list