Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit78fff62

Browse files
authored
Merge pull request#38 from github/pse-paved-paths-fix-task-list-drag
Fix Task Lists Element dragability
2 parentsb9ed6bc +e5a43ce commit78fff62

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎src/task-lists-element.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,25 @@ export default class TaskListsElement extends HTMLElement {
7474
}
7575

7676
consthandleTemplate=document.createElement('template')
77-
constspan=handleTemplate.content.appendChild(document.createElement('span'))
77+
constspan=document.createElement('span')
7878
span.classList.add('handle')
79-
constsvg=span.appendChild(document.createElement('svg'))
79+
80+
constsvg=document.createElementNS('http://www.w3.org/2000/svg','svg')
8081
svg.classList.add('drag-handle')
8182
svg.setAttribute('aria-hidden','true')
8283
svg.setAttribute('width','16')
8384
svg.setAttribute('height','16')
84-
constpath=svg.appendChild(document.createElement('path'))
85+
86+
constpath=document.createElementNS('http://www.w3.org/2000/svg','path')
8587
path.setAttribute(
8688
'd',
8789
'M10 13a1 1 0 100-2 1 1 0 000 2zm-4 0a1 1 0 100-2 1 1 0 000 2zm1-5a1 1 0 11-2 0 1 1 0 012 0zm3 1a1 1 0 100-2 1 1 0 000 2zm1-5a1 1 0 11-2 0 1 1 0 012 0zM6 5a1 1 0 100-2 1 1 0 000 2z'
8890
)
8991

92+
handleTemplate.content.appendChild(span)
93+
span.appendChild(svg)
94+
svg.appendChild(path)
95+
9096
constinitialized=newWeakMap()
9197

9298
// Only top-level lists are draggable, and nested lists drag with their parent item.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp