-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firefox: NS_ERROR_NOT_IMPLEMENTED on unsupported movements in Visual & Caret Mode #4633
Comments
Hey @philg-dev, this is interesting analysis. To summarize, we have these problems and possible solutions when using an unsupported boundary in Firefox:
If we do nothing else, I prefer we do 3b so at least we have an explicit log of what's happening, to avoid future bug reports about it. I think 2a would be better than just logging console errors, and is probably straightforward. If we try to tackle 1, I wouldn't want to introduce a complicated polyfill, but if it's short and clear, I think that's acceptable. I agree that G and gg are the most important of the missing boundaries. |
@philc yes, your summary nails it. Note on 1Just to clarify: the motions don't work specifically in Visual / Caret Mode. In Normal Mode on 1 a): From what I've seen regarding some other features that are kinda niche, Firefox might take years in order to implement the missing functionality. I found a bugzilla ticket on this topic which has been open since March 2021 with little to no activity developers themselves. Regrading a fix for Vimium:At the very first glance I couldn't find an existing polyfill for this and even if it exists, it would probably be quite complicated in total. Therefore, since you prefer not to add a complicated polyfill, we would end up not being able to support the In a further step, we could still try to find a short and clear polyfill solution to provide |
Regarding the
SyntaxError
I've mentioned in #4629I just realized, that Firefox only returns a
SyntaxError
on completely invalid values for thegranularity
, which was triggered byvimword
in our case before I added the necessaryreturn
statements.In cases where
granularity
is set to a value that is defined in the method standard, but isn't implemented in Firefox, it throwsNS_ERROR_NOT_IMPLEMENTED
instead. So those errors still appear in the Firefox console even after my fix from #4632.Quote from MDN modify#granularity
From
VisualMode.prototype.movements
defined incontent_scripts/mode_visual.js
So Vimium's bindings for
( ) { } gg G
currently fail in Firefox and produce the error in the console.It might be worth considering catching these cases and adding a warning message to inform the user about this incompatibility. However in those cases the HUD is already occupied showing the
Visual Mode
orCaret Mode
respectively, so I don't know how that would work.Alternatively, we might also go the extra mile and try to find an implementation to polyfill (some of) this missing behavior to become available in Firefox as well. I feel like
documentboundary
might be fairly easy to implement -paragraph
andsentence
might be more tricky.@philc what do you think we should do? I wanted to discuss this first before going down that rabbit hole on my own. The minimum fix, I would suggest to implement is catching these cases to avoid the console errors.
To Reproduce
Steps to reproduce the behavior:
( ) { } gg G
NS_ERROR_NOT_IMPLEMENTED
appears in the browser consoleBrowser and Vimium version
Firefox 135.0
Vimium 2.1.2
The text was updated successfully, but these errors were encountered: