Giter VIP home page Giter VIP logo

Comments (7)

barchambeault-edr avatar barchambeault-edr commented on June 5, 2024

We are currently working around this in this way: when the user clicks the "click to place text" cursor, we get a pm:create. in there, we do:

  const textLayer = L.marker([latlng], { pmIgnore: false, textMarker: true })
  textLayer.addTo(map);
  textLayer.pm.enable();
  textLayer.pm.focus();

then we listen for pm:textblur. this all works great, but is clearly not the "correct" way, so again, any help here would be greatly appreciated...

from leaflet-geoman.

barchambeault-edr avatar barchambeault-edr commented on June 5, 2024

update on the workaround above - while it does let me put a text layer into edit mode, once i'm done editing it, the map is "stuck". normally, after you click out of the textarea, the cursor goes back to a hand and you can manipulate the map. but, in my case, the cursor stays a pointer, and you can no longer manipulate the map. so, my workaround doesn't really work.

so, again, looking for any kind of pointers here. thanks.

from leaflet-geoman.

barchambeault-edr avatar barchambeault-edr commented on June 5, 2024

so, looks like i just ran into this bug: #1300

if i do a map.dragging.enable() after the pm:textblur, everything is fine. so, our workaround is still in place. as for the "Autofocus processing was blocked because a document already has a focused element error" message, this is also reproducible in the geoman demo (https://geoman.io/demo), so i guess i just need to live with it for now...

from leaflet-geoman.

Falke-Design avatar Falke-Design commented on June 5, 2024

Sorry for the late response.

I checked what could cause this issue and it is because of the autofocus property on the textarea. In the PR #1409 we will remove the autofocus property because it should be not set by Geoman and has no further purpose for us.

from leaflet-geoman.

barchambeault-edr avatar barchambeault-edr commented on June 5, 2024

@Falke-Design thanks for the response. good to know the error will be doing away. we use the "pro" version, which is way behind the "free" version in terms of bug fixes and new features. Any idea when the "pro" version will get in sync with the "free" version?

from leaflet-geoman.

Falke-Design avatar Falke-Design commented on June 5, 2024

I already talked with @codeofsumit. We will release 2.15.0 ASAP and then update the Pro version as fast as possible.

from leaflet-geoman.

Falke-Design avatar Falke-Design commented on June 5, 2024

Fixed with #1409

from leaflet-geoman.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.