MapGuide Open Source:  Home |  Download |  Internals

Ticket #5 (closed defect: fixed)

Opened 2 years ago

Last modified 1 year ago

Bug in Firefox? after onclick event mapviewer go up. (Digitalizing and Readlining function)

Reported by: maciej.skorczewski@procad.pl Assigned to: chrisclaydon
Priority: medium Milestone: 2.0
Component: AJAX Viewer Version: 1.1.0
Severity: major Keywords:
Cc: External ID: 911499

Description

I observe strange thing in Firefox Browser. Allways when you use Digitalizing and Readlining function like:

DigitizeLine?() etc...

the mapviewerpane go up! (map area) (all mapviewer move on top) sometimes 10px and more up!

IE don't have any problem whit this... function are call by OnClick? event. (in BUTTON ) ex. <input type=button name=ev1 OnClick?=DigitizeLine?()>

look on screen 1. map on begin http://img338.imageshack.us/img338/9707/23480612pz3.jpg

2. After click on button http://img99.imageshack.us/img99/919/70176725fo0.jpg

Change History

(in reply to: ↑ description ) 02/27/07 03:37:12 changed by anonymous

take a look on

Digitizing and Redlining > Digitizing Sample in

http://data.mapguide.com/mapguide/devguide/index.php

02/27/07 13:09:55 changed by anonymous

  • external_id set to 911499.

02/27/07 13:10:08 changed by anonymous

  • status changed from new to assigned.
  • owner set to anonymous.

02/28/07 03:49:10 changed by anonymous

  • status changed from assigned to closed.
  • component changed from Viewer API to AJAX Viewer.
  • resolution set to fixed.

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

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:

document.getElementById("KeyTarget?").focus();

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.

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:

if(!msie) document.getElementById("KeyTarget?").style.display = "none";


02/28/07 04:04:10 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

02/28/07 04:05:16 changed by anonymous

  • status changed from reopened to closed.
  • resolution set to fixed.

05/21/07 01:28:31 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

A fix was suggested by Maciej Skórczewski - also applies to this error, which incidentally is back in 1.2 Beta2

  1. try turn on properties pane.
  1. edit ajaxmappane.templ (on end of files modyfity)

<input id="KeyTarget?"

type="text" onKeyDown="return KeyPressed?(event);" style="position: absolute; left: 0px; right: 0px; width: 0px; height: 0px" >

to

<input id="KeyTarget?"

type="hidden" onKeyDown="return KeyPressed?(event);" style="position: absolute; left: 0px; right: 0px; width: 0px; height: 0px" >

05/31/07 23:32:24 changed by tomfukushima

  • status changed from reopened to new.
  • owner changed from anonymous to chrisclaydon.

05/31/07 23:32:37 changed by tomfukushima

  • milestone changed from 1.2 to 1.3.

06/01/07 02:07:29 changed by jbirch

Possibly additional info in #68

07/05/07 23:09:05 changed by jng

Just some more info, but only from the perspective of bug #68

The problem seems to manifest itself if the properties pane is turned off in the web layout.

This is in MG 1.2.0RC2

07/06/07 16:22:13 changed by rexszeto

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in 1.2.x by submission http://trac.osgeo.org/mapguide/changeset/1889

Fixed in trunk by submission http://trac.osgeo.org/mapguide/changeset/1890