{"action":"created","issue":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4157","labels_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4157/labels{/name}","comments_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4157/comments","events_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4157/events","html_url":"https://github.com/Leaflet/Leaflet/issues/4157","id":127230543,"number":4157,"title":"Disable dragging not working correctly in IE, FF","user":{"login":"amir-infsoft","id":15727078,"avatar_url":"https://avatars.githubusercontent.com/u/15727078?v=3","gravatar_id":"","url":"https://api.github.com/users/amir-infsoft","html_url":"https://github.com/amir-infsoft","followers_url":"https://api.github.com/users/amir-infsoft/followers","following_url":"https://api.github.com/users/amir-infsoft/following{/other_user}","gists_url":"https://api.github.com/users/amir-infsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/amir-infsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amir-infsoft/subscriptions","organizations_url":"https://api.github.com/users/amir-infsoft/orgs","repos_url":"https://api.github.com/users/amir-infsoft/repos","events_url":"https://api.github.com/users/amir-infsoft/events{/privacy}","received_events_url":"https://api.github.com/users/amir-infsoft/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-18T13:54:16Z","updated_at":"2016-01-18T15:41:08Z","closed_at":"2016-01-18T15:41:08Z","body":"In my case I need to disable map panning when user clicks on map and re-enable it when mouse click is released.\r\n\r\n(I am using current Leaflet v0.7.7)\r\n\r\nI implement this with:  \r\n```\r\n//disable\r\nmap.on('mousedown', function (e) {\r\n           console.log('mousemove');\r\n           map.dragging.disable();\r\n            return false;\r\n        });\r\n\r\n//in meanwhile I am monitoring mouse and intend to do some drawing \r\n//(that is why map has to stay fixed)\r\nmap.on('mousemove', function (e) {\r\n            console.log('mousemove');\r\n            //some drawing\r\n        });\r\n\r\n//re-enable\r\nmap.on('mouseup mouseout', function (e) {          \r\n            map.dragging.enable();\r\n            console.log('mouse up');\r\n            return false;\r\n        });\r\n```\r\nIt works correctly in Chrome (testing in v47).\r\n\r\nInterenet explorer (testing in v11): \r\nIn IE it does not disable dragging. Actually it does disable dragging but later, when mouse press is released.\r\n\r\nFirefox (testing in v43.0.4).\r\nIn Firefox panning is disabled, but then dragging images (default browser behavior) is enabled. I tried to disable it, but it does not work. Any other solution to disable image dragging here?\r\n```\r\n//works to disable other images dragging but not with leaflet tile images\r\n$(document).on(\"dragstart\", \"img\", function() {\r\n            return false;\r\n        });\r\n```\r\nAlso if there is some other/better approach to get map fixed for drawing, please let me know...\r\n\r\nThanks for any help,\r\nAmir\r\n"},"comment":{"url":"https://api.github.com/repos/Leaflet/Leaflet/issues/comments/172564506","html_url":"https://github.com/Leaflet/Leaflet/issues/4157#issuecomment-172564506","issue_url":"https://api.github.com/repos/Leaflet/Leaflet/issues/4157","id":172564506,"user":{"login":"IvanSanchez","id":1125786,"avatar_url":"https://avatars.githubusercontent.com/u/1125786?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanSanchez","html_url":"https://github.com/IvanSanchez","followers_url":"https://api.github.com/users/IvanSanchez/followers","following_url":"https://api.github.com/users/IvanSanchez/following{/other_user}","gists_url":"https://api.github.com/users/IvanSanchez/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanSanchez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanSanchez/subscriptions","organizations_url":"https://api.github.com/users/IvanSanchez/orgs","repos_url":"https://api.github.com/users/IvanSanchez/repos","events_url":"https://api.github.com/users/IvanSanchez/events{/privacy}","received_events_url":"https://api.github.com/users/IvanSanchez/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T15:41:08Z","updated_at":"2016-01-18T15:41:08Z","body":"Duplicate of #3666."}}