Closed Bug 888319 Opened 11 years ago Closed 8 years ago

svg makes -moz-user-select: none content selectable

Categories

(Core :: DOM: Selection, defect)

25 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: john.firebaugh, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:25.0) Gecko/20130627 Firefox/25.0 (Nightly/Aurora) Build ID: 20130627031027 Steps to reproduce: Test case: <!DOCTYPE html> <html style="-moz-user-select: none; -webkit-user-select: none;"> <body> <div id="map"> <img style="position: absolute;" src="http://c.tile.cloudmade.com/d4fc77ea4a63471cab2423e66626cbb6/997/256/10/523/355.png"> <svg width="256" height="256" style="position: absolute;"></svg> </div> </body> </html> Double-click the image. Actual results: Image appears selected, `window.getSelection()` indicates entire #map element is selected. Expected results: Nothing is selected. Without the SVG element it behaves as expected. In Chrome and Safari it behaves as expected. This comes from an upstream bug report in Leaflet: https://github.com/Leaflet/Leaflet/issues/1807
Likely related/duplicate of #648624.
You can also remove the SVG overlay, and clicking outside the image will select it.
Component: Untriaged → Selection
Product: Firefox → Core
This doesn't seem to reproduce anymore. The PNG used in the testcase is no longer accessible, but after replacing it with a generic 1024x768 image and playing around, I can't select the image (even if I follow the steps of removing the SVG and clicking outside the image).
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.