Opened 12 years ago

Closed 11 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)

comment:1 in reply to:  description Changed 12 years ago by anonymous

take a look on

Digitizing and Redlining > Digitizing Sample in

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

comment:2 Changed 12 years ago by anonymous

External ID: 911499

comment:3 Changed 12 years ago by anonymous

Owner: set to anonymous
Status: newassigned

comment:4 Changed 12 years ago by anonymous

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 Changed 12 years ago by anonymous

Resolution: fixed
Status: closedreopened

comment:6 Changed 12 years ago by anonymous

Resolution: fixed
Status: reopenedclosed

comment:7 Changed 11 years ago by anonymous

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 Changed 11 years ago by tomfukushima

Owner: changed from anonymous to chrisclaydon
Status: reopenednew

comment:9 Changed 11 years ago by tomfukushima

Milestone: 1.21.3

comment:10 Changed 11 years ago by jbirch

Possibly additional info in #68

comment:11 Changed 11 years ago 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

comment:12 Changed 11 years ago by rexszeto

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