Opened 9 years ago

Closed 8 years ago

#3410 closed defect (fixed)

potlatch2 can't exit from dragging toolbox

Reported by: FK270673 Owned by: potlatch-dev@…
Priority: blocker Milestone:
Component: potlatch2 Version: 2.0
Keywords: potlatch2 dragging toolbox Cc:

Description

Unfortunately I am sometimes stuck in dragging the small toolbox. After having clicked one of the buttons, the toolbox follows my mouse, but it is impossible to leave the dragging toolbox.

Change History (9)

comment:1 Changed 9 years ago by FK270673

Priority: criticalblocker

Today, it happened again. After merging two ways, I was not able to exit the dragging toolbox with the merge button.

comment:2 Changed 9 years ago by FK270673

The arrow keys are the only keys which obviously react.

comment:3 Changed 9 years ago by stevage

I can't reproduce this. Any more information? Is there a particular sequence of mouse/keyboard actions that always causes it?

comment:4 Changed 8 years ago by FK270673

Keywords: potlatch2 added
Summary: can't exit from dragging toolboxpotlatch2 can't exit from dragging toolbox

Clicking merge ways (toolbox) -> loading data forever -> can't exit dragging toolbox

comment:5 Changed 8 years ago by FK270673

Now I have identified and solved the problem

It happens exactly when Potlatch2 reaches the local memory limit which was limited to 100kB on my computer. After changing global settings, Potlatch2 was working again.

comment:6 Changed 8 years ago by stevage

So in terms of this being a blocker, does that represent a solution or a just a per-user workaround?

comment:7 in reply to:  6 Changed 8 years ago by FK270673

Replying to stevage:

So in terms of this being a blocker, does that represent a solution or a just a per-user workaround?

I would consider it as personal workaround by an experienced user. However, it might distract mappers from using Potlatch2, so there should be a user-friendly solution that enables them to exit the toolbox EASILY and everytime (something like "press Escape or X or whatever to exit the toolbox") and to save their work without workarounds.

Furthermore, it would be better if a popup informs about memory exceed rather than doing strange things that are hard to understand for dumb users.

comment:8 Changed 8 years ago by Richard

I genuinely don't think the local memory limit has much to do with it. Potlatch uses very little "local storage" and it's mostly irrelevant to the toolbox. If it does fix it then it's more by accident than design.

I can (just about) reproduce this by doing lots of panning around while it's loading a whole bunch of data. This strongly suggests that the issue is a mouse-up event not being passed through to the Toolbox.

Probably the most feasible solution is to make the Toolbox drag listen to mouse-up events on the Stage, rather than exclusively on the toolbox. For tidiness, we should therefore set up the listener at the start of each drag and remove it at the end, rather than reacting on every single mouse-up that might ever happen in P2. In other words:

# Remove super.titleBar.addEventListener(MouseEvent?.MOUSE_UP,handleUp); from createChildren in Toolbox.mxml # Add stage.addEventListener(MouseEvent?.MOUSE_UP,handleUp) to the handleDown method # Add stage.removeEventListener(MouseEvent?.MOUSE_UP,handleUp) to the handleUp method

This'll need to be tested (I presume stage is accessible from any mxml component?) but looks likely to me.

comment:9 Changed 8 years ago by Richard

Resolution: fixed
Status: newclosed

Committed in r25533, let us know if it reoccurs (on a site that's running r25533+, of course :) ).

Note: See TracTickets for help on using tickets.