glacambre / firenvim

Embed Neovim in Chrome, Firefox & others.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Firenvim conflict with Github "Review changes" text box

larsks opened this issue · comments

  • OS Version: Fedora 38
  • Browser Version: Chrome 121.0.6167.160
  • Browser Addon Version: 0.2.15
  • Neovim Plugin Version: 8c6c00a

What I tried to do

With firenvim enabled,I cannot enter text into the "Finish your review" text box when reviewing GitHub pull requests:

Screenshot from 2024-02-13 16-36-39

Attempting to activate the "Leave a comment" field by clicking in briefly flashes the border of the field, but the field never becomes active and I am unable to enter text. If I disable firenvim in the tab it works as expected.

This is the only text field (on GitHub or elsewhere) for which I have encountered this problem.

Hi, thanks for the report! This doesn't happen with Firefox on debian, I'll try Chrome in a few hours.

I have the following vim configuration that might be relevant:

if exists('g:started_by_firenvim')
    function! AdjustMinimumLines(timer)
            if &lines < 10
                set lines=10
            endif
    endfunction

    function! OnUIEnter(event) abort
        if 'Firenvim' ==# get(get(nvim_get_chan_info(a:event.chan), 'client', {}), 'name', '')
            set laststatus=0
	    set guifont=Iosevka\ Fixed\ Curly\ Light:h14

            call timer_start(100, function("AdjustMinimumLines"))
        endif
    endfunction

    autocmd UIEnter * call OnUIEnter(deepcopy(v:event))
endif

I'll retry with that disabled.

Update: Disabling that does not have any effect on the behavior.

Can repro on Chrome, will dig in :)

Workaround:

let g:firenvim_config = {
    \ 'localSettings': {
        \ 'github.com': {
            \ 'selector': 'textarea:not(#pull_request_review_body)',
        \ }
    \ }
\ }