We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a62a5b0 commit 19ffa09Copy full SHA for 19ffa09
lib/selectable-overlay.ts
@@ -1,8 +1,13 @@
1
import { TextEditor, TextEditorComponent } from "atom"
2
3
-/** makes the text selectable with the help of `user-select: text` and `pointer-events: all` in CSS */
+/** makes the text selectable
4
+ - You can directly add `user-select: text` and `pointer-events: all` in CSS for better performance
5
+ */
6
export function makeOverlaySelectable(editor: TextEditor, overlayElement: HTMLElement) {
7
overlayElement.setAttribute("tabindex", "-1")
8
+ if (overlayElement.style.userSelect === "none") {
9
+ overlayElement.style.userSelect = "text"
10
+ }
11
overlayFocusFix(editor, overlayElement)
12
}
13
0 commit comments