Skip to content
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

Blocker does not block active/focused widget when blocker is attached to Composite #9551

Open
ronkie opened this issue Jul 25, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@ronkie
Copy link
Contributor

commented Jul 25, 2018

qx.ui.core.Blocker does not block active/focused widget when blocker is attached to qx.ui.container.Composite which contains that widget.

To Reproduce
Steps to reproduce the behavior:

  1. Go to playground example: http://tinyurl.com/y862cwg7
  2. Type something into text field, then Press Enter. It will activate the Blocker which is attached to Composite that contains text field
  3. See that you can still type into the widget, which is not correct. If now to click outside the text field to make it loose focus, it will get blocked as expected.

Expected behavior
Text field should get blocked immediately, so user cannot type anything into there anymore.

Desktop:

  • OS: Mac OSX, Windows 10
  • Tested in latest Chrome
@level420

This comment has been minimized.

Copy link
Member

commented Jul 31, 2018

The blocker does not contain any code which causes the focus to be removed from the current widget (here the text field). If you first call text.blur(); in your example it should work:

http://tinyurl.com/y862cwg7

@level420

This comment has been minimized.

Copy link
Member

commented Jul 31, 2018

Or attach the blocker to root. this way all keyboard input is captured:

http://tinyurl.com/yc86a7zm

@ronkie

This comment has been minimized.

Copy link
Contributor Author

commented Aug 2, 2018

Hi,

Thanks for your reply! Yes, indeed we tried to blur the widget in our own blocker implementation that inherits from qx Blocker, and it worked.
So, maybe it makes sense to integrate this change? I've created a pull request.

ronkie added a commit to ronkie/qooxdoo that referenced this issue Aug 6, 2018

qooxdoo#9551 blur and deactivate widget before activating the blocker
Changed variable declaration into several lines

johnspackman added a commit to johnspackman/qooxdoo that referenced this issue Sep 11, 2018

Merge commit '4d54bea9bede0d558d6eaf3d69ed66a1c58fea44'
* commit '4d54bea9bede0d558d6eaf3d69ed66a1c58fea44': (22 commits)
  fix store test
  fix tests and add the old way as legacy method
  nameing the jobs
  fix missing blocks (discovered by newly active lint run)
  * make travis run stage scripts in parallel * add chrome test
  dummy edit
  empty change to trigger rebuild
  getting travis PR builds back (qooxdoo#9562)
  Ensure no memory leak. Certain stored sender objects could previously cause it
  allow continuous debugging of non-freed, with periodic printout since epoch
  Update Table.js
  deleted module
  add hash function to the interface to make it overridable
  use other separator than " for classname because it breaks the generated code of properties added by mixins.
  documentation change
  test for non-promise values
  no message
  qooxdoo#9551 blur and deactivate widget before activating the blocker Changed variable declaration into several lines
  fixed example - removed brackets around the function call. Now example matches true implementation and wont break the app
  Updated example and spacing per derrell's request
  ...

johnspackman added a commit to johnspackman/qooxdoo that referenced this issue Nov 20, 2018

Merge commit 'f752846b2f03d978d66abd8b63e3db7bd800628c'
* commit 'f752846b2f03d978d66abd8b63e3db7bd800628c':
  nameing the jobs
  fix missing blocks (discovered by newly active lint run)
  * make travis run stage scripts in parallel * add chrome test
  dummy edit
  empty change to trigger rebuild
  getting travis PR builds back (qooxdoo#9562)
  Ensure no memory leak. Certain stored sender objects could previously cause it
  allow continuous debugging of non-freed, with periodic printout since epoch
  Update Table.js
  qooxdoo#9551 blur and deactivate widget before activating the blocker Changed variable declaration into several lines
  fixed example - removed brackets around the function call. Now example matches true implementation and wont break the app
  Updated example and spacing per derrell's request
  qooxdoo#9551 blur and deactivate widget before activating the blocker
  added "boot" : "function" to the __allowedKeys. I then added "config.boot()" to the last line of qx.Theme.define() function with if condition to ensure that it exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.