Skip to content

Commit

Permalink
Refactor makeFocusableForeignObject
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoping committed Feb 7, 2022
1 parent c62a396 commit cebf364
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -804,12 +804,13 @@ var focusSummary = {
}

function makeFocusableForeignObject() {
// Returns <foreignObject width="30" height="30">\n <input type="text"/>\n </foreignObject>
var foreignObject = document.createElementNS(
'http://www.w3.org/2000/svg',
'foreignObject'
)
foreignObject.setAttribute('width', 30)
foreignObject.setAttribute('height', 30)
foreignObject.width.baseVal.value = 30
foreignObject.height.baseVal.value = 30
foreignObject.appendChild(document.createElement('input'))
foreignObject.lastChild.type = 'text'

Expand Down

0 comments on commit cebf364

Please sign in to comment.