Opened 18 years ago

Closed 17 years ago

#5 closed defect (fixed)

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

Reported by: maciej.skorczewski@… Owned by: 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

  1. After click on button

http://img99.imageshack.us/img99/919/70176725fo0.jpg

Change History (12)

in reply to:  description comment:1 by anonymous, 18 years ago

take a look on

Digitizing and Redlining > Digitizing Sample in

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

comment:2 by anonymous, 18 years ago

External ID: 911499

comment:3 by anonymous, 18 years ago

Owner: set to anonymous
Status: newassigned

comment:4 by anonymous, 18 years ago

Component: Viewer APIAJAX Viewer
Resolution: fixed
Status: assignedclosed

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";


comment:5 by anonymous, 18 years ago

Resolution: fixed
Status: closedreopened

comment:6 by anonymous, 18 years ago

Resolution: fixed
Status: reopenedclosed

comment:7 by anonymous, 18 years ago

Resolution: fixed
Status: closedreopened

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" >

comment:8 by tomfukushima, 17 years ago

Owner: changed from anonymous to chrisclaydon
Status: reopenednew

comment:9 by tomfukushima, 17 years ago

Milestone: 1.21.3

comment:10 by jbirch, 17 years ago

Possibly additional info in #68

comment:11 by jng, 17 years ago

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

comment:12 by rexszeto, 17 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.