Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

GitLab's diff or Code Review has an extremely annoying feature for people who fidget with text, especially when dragging text.

In addition to highlighting and "painting" the text, I often click and drag the highlighted text around. If some text is dragged onto the code view in Firefox, the dropped text seems to be treated like URLs, and opened either in new tabs or in the current tab.

https://gitlab.com/gitlab-org/gitlab/uploads/666d09080e20ea8...



If gitlab allows uploads by dropping files outside of the textarea, it might be a bug related to that (either in the browser or more likely in gitlab). This is standard for dragging urls or files into the browser from outside when the website isn't a drop target, afaik. You might be able to write a user script to disable it.

Alternatively, if you feel like rebuilding Firefox yourself, it looks like nsBaseDragService.cpp _might_ help you with preventing stuff from being dropped anywhere; I haven't read the whole file, but going by the name, overriding aCanDrop and mCanDrop to false might help. See lines 62, 84, 92. This _might_ allow you to continue dragging stuff around but disable dropping stuff.

[1]: https://searchfox.org/mozilla-central/source/widget/nsBaseDr...




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: