Ticket #5 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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

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

Change History

in reply to: ↑ description   Changed 5 years ago by anonymous

take a look on

Digitizing and Redlining > Digitizing Sample in

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

  Changed 5 years ago by anonymous

  • external_id set to 911499

  Changed 5 years ago by anonymous

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

  Changed 5 years ago by anonymous

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

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


  Changed 5 years ago by anonymous

  • status changed from closed to reopened
  • resolution fixed deleted

  Changed 5 years ago by anonymous

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

  Changed 5 years ago by anonymous

  • status changed from closed to reopened
  • resolution fixed 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" >

  Changed 5 years ago by tomfukushima

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

  Changed 5 years ago by tomfukushima

  • milestone changed from 1.2 to 1.3

  Changed 5 years ago by jbirch

Possibly additional info in #68

  Changed 5 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

  Changed 5 years ago by rexszeto

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.