GithubHelp home page GithubHelp logo

Comments (19)

maxauthority avatar maxauthority commented on August 19, 2024

Have you tried disabling Flash? I tried the page and on the login-page
Firefox asked "Allow quora.com to run Adobe flash?" So if you don't block
flash by default I guess somehow the applet gains focus and we can't do
anything against it. Without flash, pressing Esc unfocussed the textbox
correctly.

On Wed, Oct 1, 2014 at 3:37 PM, quantum-mechanic [email protected]
wrote:

on Quora.com as soon as the page loads the search field is selected and
vimperator is in insert mode
hitting escape has no effect , and insert mode can only be escaped by
clicking somewhere .

β€”
Reply to this email directly or view it on GitHub
#46.

from vimperator-labs.

 avatar commented on August 19, 2024

yes i tried disabling flash ; this issue persists even without flash , it is the quora search bar that gains the focus and impossible to escape from

from vimperator-labs.

derenio avatar derenio commented on August 19, 2024

I've come across the same issue with the https://slack.com communicator.
Theirs main message's input, once focused, cannot be escaped with Esc key but only by clicking outside of it.

from vimperator-labs.

derenio avatar derenio commented on August 19, 2024

I've just noticed that the search input on:

also cannot be escaped by pressing Esc (though in this case one can regain the focus by pressing a tab).

from vimperator-labs.

severtsev avatar severtsev commented on August 19, 2024

I've come with this solution: severtsev@db1b653 . Since I am not a Gecko portability guru by any means someone should review this.
Probably fixes #80 and #28.

from vimperator-labs.

maxauthority avatar maxauthority commented on August 19, 2024

Has anyone tried the patch from @severtsev to see if it causes some other weird problems? Patches at that low level are always risky and needs some testing.

from vimperator-labs.

gkatsev avatar gkatsev commented on August 19, 2024

@severtsev care to submit a PR for your change? It'll be easier to check out.

from vimperator-labs.

severtsev avatar severtsev commented on August 19, 2024

@gkatsev #154

from vimperator-labs.

caisui avatar caisui commented on August 19, 2024

This issue is caused by bug 501496.

see:
https://developer.mozilla.org/en/Firefox/Releases/25#Interfaces.2FAPIs.2FDOM
https://bugzilla.mozilla.org/show_bug.cgi?id=501496

simplistic fix

diff --git a/common/content/events.js b/common/content/events.js
index 285a1e9..7731ad6 100644
--- a/common/content/events.js
+++ b/common/content/events.js
@@ -1083,7 +1083,7 @@ const Events = Module("events", {

     // this is need for sites like msn.com which focus the input field on keydown
     onKeyUpOrDown: function (event) {
-        if (modes.passNextKey || modes.passAllKeys || modes.isMenuShown || Events.isInputElemFocused())
+        if (modes.passNextKey || modes.passAllKeys || modes.isMenuShown)
             return;
         event.stopPropagation();
     },

I think that it is necessary to implement the command, such as ignorekeys command.

example:
:stoppropagation add play\\.google\\.com

about: #28

select element's keydown event has been implemented in native code....
http://mxr.mozilla.org/mozilla-central/source/layout/forms/nsListControlFrame.cpp#2177

from vimperator-labs.

gkatsev avatar gkatsev commented on August 19, 2024

@caisui unfortunately, that simplistic fix isn't going to fly. That was the exact issue that brought on #90 where content-editable divs weren't considered input elements, so, the event propagation was stopped on them and caused a whole lot of issues.

from vimperator-labs.

caisui avatar caisui commented on August 19, 2024

the event propagation was stopped on them and caused a whole lot of issues.

Yes, so that it is necessary to implement a blacklist (or white list) in order to control propagation.
It is the above-mentioned stoppropagation command.

diff --git a/common/content/events.js b/common/content/events.js
index 1669478..8d4c50b 100644
--- a/common/content/events.js
+++ b/common/content/events.js
@@ -1083,7 +1083,8 @@ const Events = Module("events", {

     // this is need for sites like msn.com which focus the input field on keydown
     onKeyUpOrDown: function (event) {
-        if (modes.passNextKey || modes.passAllKeys || modes.isMenuShown || Events.isInputElemFocused())
+        // CheckPropagation include Events.isInputElemFocused
+        if (modes.passNextKey || modes.passAllKeys || modes.isMenuShown || CheckPropagation(xxx))
             return;
         event.stopPropagation();
     },

from vimperator-labs.

maxauthority avatar maxauthority commented on August 19, 2024

Does Commit #154 fix it? Then we can close the issue.

from vimperator-labs.

gkatsev avatar gkatsev commented on August 19, 2024

Going to close this since #154 landed in master. I'll release a nightly on github when I get home tonight.
If we have issues with this, we could always re-open the issue.

from vimperator-labs.

gkatsev avatar gkatsev commented on August 19, 2024

#154 was reverted. Reopening.

from vimperator-labs.

derenio avatar derenio commented on August 19, 2024

I've just found out that pressing Ctrl+[ successfully escapes the insert mode of input/textarea on the problematic pages (that is https://slack.com and http://quora.com in my case).

I was forced to "discover it" as some recent commits* since the "revert of #154" made the "new message" input on slack auto-focused, not giving me even a single command before going insert mode).

(*) I suspect this one 3a989ab

Edit:
Ctrl+c doesn't work, so I suspect that somewhere there is a bug for Ctrl+[ which makes this thing a but for Esc and Ctrl+c :|

from vimperator-labs.

maxauthority avatar maxauthority commented on August 19, 2024

What do you mean with "revert of #154
#154"? Shouldn't that
still be in master?
Or do you mean #154 causes the problems for you?

from vimperator-labs.

derenio avatar derenio commented on August 19, 2024

I was basing my comment on the context of the previous comment, that is to:

Revert "Merge pull request #154 from severtsev/master" as it causes #198 78b296f

That was the last time (before yesterday) I've pulled the latest changes and made the plugin. Since the #154 was already reverted, this issue was (and is) still present.

Yesterday it got worse as the "message input" on slack is being auto-focused* (despite set focuscontent). I've just reverted the commit 3a989ab and it worked (no focus) as before.

(*) Actually the auto-focus with slack wasn't the purpose for that comment. Before, I've managed to overcome this issue (#46) with tab's change (alt+X, alt+Y - as at start the input wasn't focused). Since this doesn't work anymore, I've discovered that the Ctrl+[ successfully escapes, hence I wanted to share this workaround.

from vimperator-labs.

tecfu avatar tecfu commented on August 19, 2024

@derenio This works for me on Ubuntu 14.04 / Firefox 37.

Great hack.

from vimperator-labs.

maxauthority avatar maxauthority commented on August 19, 2024

Hmm, so the question is if we should revert 3a989ab
3a989ab
as
well, as it seems to fix some issues, but also cause others :/ The question
is which causes MORE/more severe issues?

On Fri, Apr 3, 2015 at 3:45 AM, 5fec8fdadc460cb8540a901f08ef288b <
[email protected]> wrote:

@derenio https://github.com/derenio This works for me on Ubuntu 14.04 /
Firefox 37.

Great hack.

β€”
Reply to this email directly or view it on GitHub
#46 (comment)
.

from vimperator-labs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.