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: | 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
- map on begin
http://img338.imageshack.us/img338/9707/23480612pz3.jpg
- After click on button
Change History (12)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
External ID: | → 911499 |
---|
comment:3 by , 18 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:4 by , 18 years ago
Component: | Viewer API → AJAX Viewer |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
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 , 18 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:6 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:7 by , 18 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
A fix was suggested by Maciej Skórczewski - also applies to this error, which incidentally is back in 1.2 Beta2
- try turn on properties pane.
- 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 , 17 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:9 by , 17 years ago
Milestone: | 1.2 → 1.3 |
---|
comment:11 by , 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 , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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
take a look on
Digitizing and Redlining > Digitizing Sample in
http://data.mapguide.com/mapguide/devguide/index.php