osmcha-frontend icon indicating copy to clipboard operation
osmcha-frontend copied to clipboard

Filters Location slection "bounding box" not working

Open Hobbesdcc opened this issue 8 months ago • 15 comments

Hi thanks for your work, this tool is great!

In the "Filters" then "Location" Looks like there is a new way to select a "bounding box" around an area. Says "Hold Shift and click to draw a bounding box." I could not get this to work, holding shift and clicking just panned the map.

Every once in a while I could spam buttons and clicks and see the blue box show, but could not do anything with it before it disappeared.

Tested on Chrome,FF,Edge.

Hobbesdcc avatar Apr 08 '25 20:04 Hobbesdcc

Thanks!

Sorry that the bounding box tool is not working for you. I think the problem might be unclear instructions. To draw a bounding box you press and hold shift, click and release to place one corner, then click and release again to place a second corner, and finally release shift. It also may be that there is a different and more expected interface for drawing a bounding box. I'll look into what other software does and see if this can be changed to be more intuitive (and also make the instructions clearer).

jake-low avatar Apr 08 '25 21:04 jake-low

Hey thanks for responding! thanks for your work on this project.

I think the instructions are alright, just not working for me, you don't have to be my tech support, just wanted to let you know!

I checked again on a brand new VM running win 11, just to make sure it was not some strange browser extension / script I have messing with the web page. (also tested on my win10 tablet)

You can tell when I'm holding shift since the cursor changes to a crosshair: Image

Hobbesdcc avatar Apr 09 '25 02:04 Hobbesdcc

@Hobbesdcc You only need to click at the corners, not drag a rectangle out across the corners. Maybe better emphasis on what to hold needed.

Kovoschiz avatar Apr 09 '25 08:04 Kovoschiz

@Kovoschiz is this working for you? I really want you to trust me, I'm doing exactly as you say and its not working on any computer I test. I've tried this on 3 computers and two VMs, I really think there is a bug here.

I turned on click indicator so you can see each time I click. Here is me testing a few ways, including holding shift and only click at the corners: Image

I know what it probably should look like since if I spam it it some times shows up for a split second. Here I hold shift, click once and move my mouse to the upper right, I don't click again, the box just appears for a split second and then disappears: Image

Hobbesdcc avatar Apr 09 '25 12:04 Hobbesdcc

Tried to draw a bounding box, had the exact same issue as @Hobbesdcc.

Hold Shift, mouse cursor changes to a cross, click and release, repeat that a few times to get a rectangle of some sort, nothing happens.

  • Windows 10
  • Vivaldi
  • Firefox

martien-176 avatar Apr 09 '25 13:04 martien-176

I'm on Firefox 137.0, macOS 15.3.2 and it works for me.

Image

  1. Hold shift (cursor changes to crosshair)
  2. click once for one corner of the rectangle
  3. move my cursor to the other corner (still holding shift)
  4. click for the other corner of the rectangle
  5. release shift (cursor changes back to pointer)

iandees avatar Apr 09 '25 14:04 iandees

@iandees that is a different workflow than described by @jake-low.

I tried both, repeated click release (jake) and yours, click once and move.

Both without seeing the blue resulting outline.

Image

martien-176 avatar Apr 09 '25 17:04 martien-176

I don't think my procedure is different than what Jake described.

  1. Hold shift. (Cursor changes to cross)
  2. Click and release once for a corner. (Bounding box starts drawing following the cursor)
  3. Click and release once for the other corner. (Bounding box is captured)
  4. Release shift. (Cursor changes back to pointer)

That being said, it seems like something is capturing your clicks and breaking it. You could try on another computer, in a private window (that doesn't have any plugins enabled), and check to see if your browser or screen is scaled to something other than 100%.

iandees avatar Apr 09 '25 17:04 iandees

Hi all,

I'm seeing this same exact issue as described in both Firefox and Vivaldi (each at latest - I tried in Firefox 136.0.4 and Firefox 137) on Windows 11.

If I click and drag the map holding nothing, it pans as expected. If I hold shift, the mouse changes to a crosshair, but clicking in two separate spots doesn't make a box appear. If I click and drag while still holding shift, it's a crosshair cursor, but it still just pans the map. Every so often, I see the phantom blue box show up and drag and disappear in the span of 500ms or so.

My copy of Vivaldi doesn't have any extensions installed. I can try in a clean profile on another computer and network later, but this should corroborate the other reports. I don't think this is user error. There are no messages in the browser console.

nickrsan avatar Apr 09 '25 19:04 nickrsan

Thanks everyone for testing this and providing detailed reports. Sounds like there is definitely something broken about this feature that's happening in certain environments. I haven't been able to reproduce the issue (tested in Firefox 137, Safari 18.3, and Chrome 135 on macOS 15), but I will continue to look into it.

For clarity, here is a recording of the expected (working) behavior.

https://github.com/user-attachments/assets/056028e6-69e9-4896-803d-04e703d6fc74

When Shift is being held, the cursor turns into a crosshair, and mouse clicks are indicated by the black circular ring that flashes around the cursor at two points in time.

jake-low avatar Apr 09 '25 20:04 jake-low

Thanks for taking a look at this! It is a useful feature!

One thing I noticed from just this thread is everyone had problems so far is windows while MacOS seems fine. (I have no idea why this would be, and maybe is unrelated, we only have a small sample size so far)

Hobbesdcc avatar Apr 09 '25 20:04 Hobbesdcc

@Hobbesdcc, i tested on Ubuntu 24.04, Firefox, and there it worked.

So you could be right that the issue is possibly related to MS Windows.

martien-176 avatar Apr 12 '25 08:04 martien-176

If this is indeed only happening on Windows, that makes me think it might be related to keyboard event handling somehow.

For what it's worth, if I implement #774 I will probably replace the "Shift click and drag" feature with a toolbar of buttons for different draw modes, similar to what was provided in the old Mapbox-based UI (which used the mapbox-gl-draw plugin). So the interface would become: (1) click a button to activate bounding box (or polygon) drawing mode, (2) click a corner, (3) click another corner. Since this interface wouldn't require detecting when Shift is pressed/released, it might also fix this issue.

jake-low avatar Apr 13 '25 20:04 jake-low

I was able to reproduce this on my Windows 11 VM in Firefox.

iandees avatar Apr 13 '25 21:04 iandees

A tid bit that maybe of help: (Unless I'm mistaken), a few days ago the bounding box did not appear when opening changesets from a tasking manager. Now the bounding box is visible after opening the filters panel, but as soon as I press the shift key the polygon disapears. Closing and reopening the panel makes the bounding box used visible again. This bounding box is green; not blue like the ones shown in this thread thus far.

Windows 10 Firefox

Pseudorandom-Pseudonym avatar Apr 14 '25 23:04 Pseudorandom-Pseudonym

I have exactly the same issue on Windows 11. To make it work I needed to open "On-Screeen Keyboard" and click a Shift key. After that I was able to select a bounding box. The shortcut to turn the keyboard on is Win+Ctrl+O.

xxlukasz11 avatar May 06 '25 19:05 xxlukasz11

#792 has been deployed which should fix this issue. Instead of holding Shift, there's now a toolbar to select the drawing mode (bbox or polygon are supported currently). To draw a bounding box, click the "Box" mode button in the toolbar, then click the map to define the first corner of the box, and click again somewhere else to define the second corner.

Image

I don't have access to a Windows machine to test, but I presume that this new UI should also work for Windows users, since it doesn't require holding any modifier keys.

Please feel free to open a new issue if you encounter any other bugs.

jake-low avatar May 08 '25 19:05 jake-low

@jake-low Hi, thank you for your continued work on this tool!

I'm currently experiencing an issue when using the filter: "Filter changesets whose bounding box intersects a chosen area."

When I select a country (in my case, Saudi Arabia) using the polygon selection, the filtering does not appear to work. No results are returned, or the results are not constrained to the selected area as expected.

I've tested this multiple times and with different browsers, and the issue seems consistent.

This might be a bug or a problem in how the spatial query is being handled behind the scenes.

Please let me know if you need any further information or if I can help test anything. Thanks again!

abdullahO2 avatar May 25 '25 05:05 abdullahO2

Image

abdullahO2 avatar May 25 '25 05:05 abdullahO2