Skip to content

Filters Location slection "bounding box" not working #776

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Hobbesdcc opened this issue Apr 8, 2025 · 15 comments
Open

Filters Location slection "bounding box" not working #776

Hobbesdcc opened this issue Apr 8, 2025 · 15 comments
Labels
bug Something isn't working

Comments

@Hobbesdcc
Copy link

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.

@jake-low
Copy link
Contributor

jake-low commented Apr 8, 2025

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).

@Hobbesdcc
Copy link
Author

Hobbesdcc commented Apr 9, 2025

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

@Kovoschiz
Copy link

@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.

@Hobbesdcc
Copy link
Author

@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

@martien-176
Copy link

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

@iandees
Copy link

iandees commented Apr 9, 2025

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)

@martien-176
Copy link

@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

@iandees
Copy link

iandees commented Apr 9, 2025

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%.

@nickrsan
Copy link

nickrsan commented Apr 9, 2025

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.

@jake-low
Copy link
Contributor

jake-low commented Apr 9, 2025

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.

Screen.Recording.2025-04-09.at.1.13.58.PM.mp4

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.

@Hobbesdcc
Copy link
Author

Hobbesdcc commented Apr 9, 2025

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)

@jake-low jake-low added the bug Something isn't working label Apr 10, 2025
@martien-176
Copy link

martien-176 commented Apr 12, 2025

@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.

@jake-low
Copy link
Contributor

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.

@iandees
Copy link

iandees commented Apr 13, 2025

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

@Pseudorandom-Pseudonym
Copy link

Pseudorandom-Pseudonym commented Apr 14, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants