Comments (7)
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.
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.
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.
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.
@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.
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.
Fixed with #1409
from leaflet-geoman.
Related Issues (20)
- map.pm.addControl() getContainer()
- Change cursor when in draw text mode? HOT 2
- Adding createCustomControl get Error: Button with this name already exists HOT 1
- leaflet 用 esri-leaflet 加载了矢量要素图层后, 使用@geoman-io/leaflet-geoman-free 进行绘制特别特别卡顿 HOT 2
- How to edit geojson data layer after set pmIgnore is true
- Global Rotate & global Remove event issues when new layers are added
- DragMode does not work correctly on mobile devices HOT 1
- Error when drawing text box after toolbar button is enabled and moving directly from mode other than draw HOT 1
- Don't open Popup while clicking on a layer while drawing
- getting script error drawing polygons, any help? HOT 2
- pm:vertexadded event listener isnt triggered when placing a vertex with a rectangle. HOT 2
- Add uniq id to geoman drawn polygon HOT 4
- Events not firing HOT 2
- Edit all layers on the shared vertex change HOT 1
- Adding a search bar HOT 1
- Lazy loading doesn't work when leaflet is dynamically imported HOT 2
- Drawing Polygon reports error and cannot close the Polygon HOT 1
- Update vertices in draw mode HOT 3
- Add a text marker to a map HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leaflet-geoman.