         @urlPopover.urlInput.value = segment.href
         @urlPopover.textInput.value = segment.textContent
         @urlPopover.style.display = 'block'
+        @urlPopover.urlInput.focus()
+        @urlPopover.urlInput.select()
         return true
 
     _hideUrlPopover : (segment) =>


    _initUrlPopover : () ->
        frag = document.createDocumentFragment()
        divElm = document.createElement('div')
        divElm.className = 'CNE_urlpop'
        frag.appendChild(divElm)
        divElm.innerHTML = 
            """
            <span class="CNE_urlpop_head">Link</span>
            <span>(Ctrl+K)</span>

        b = document.querySelector('body')
        # b.appendChild(frag)
        b.insertBefore(frag,b.firstChild)
        [btnOK,btnCancel] = pop.querySelectorAll('button')
        btnOK.addEventListener('click',@_validateUrlPopover)
        # btnOK = pop.querySelector('button')
        btnCancel.addEventListener('click',@_hideUrlPopover)
        [urlInput,textInput] = pop.querySelectorAll('input')
        pop.urlInput = urlInput
        pop.textInput = textInput
        pop.addEventListener 'keypress', (e) =>
            if e.keyCode == 13
                @_validateUrlPopover()
            else if e.keyCode == 27
                @_hideUrlPopover()
        pop.addEventListener('focusout',@_hideUrlPopover) #don't work ?
        @urlPopover = pop

        return true

