question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Input fields unresponsive in fullscreen mode

See original GitHub issue

Hello everybody,

Last year I integrated blockly into the Node-RED IOT framework. This works fine but our users have asked to be able to show the Blockly editor in full-screen mode. I have implemented that feature request in plain Javascript, and it works!

But the problem is that (only in fullscreen mode) the input fields don’t respond:

  • When clicking on a dropdown, the dropdown doesn’t appear
  • When clicking on a color picker, the picker doesn’t appear
  • When clicking on an edit box, the text is not selected and you can not enter new characters

In had this problem in my old Blockly version, but after installing the current version from the Github master branch it is still the same behaviour. So I assume it is in all Blockly versions…

To Reproduce

I used the following standard code snippet to goto fullscreen mode, when an expand button is clicked:

var blocklyArea = $("#node-red-contrib-blockly-expandable");
var blocklyFullScreenRequest = blocklyArea[0].requestFullscreen || blocklyArea[0].mozRequestFullScreen || blocklyArea[0].webkitRequestFullscreen || blocklyArea[0].msRequestFullScreen;
// Check whether the browser supports fullscreen
if (blocklyFullScreenRequest) {
   // Expand the Blockly editor when the expand button has been clicked
   expandblocklyAreaButton.click(function(e) {
      // Make sure (on all browsers) that the blocklyArea DIV element has 100% AFTER it has become fullscreen
      // If document.fullscreenElement is null then full-screen mode has been quitted...
      blocklyArea.on('webkitfullscreenchange mozfullscreenchange msRequestFullscreen fullscreencha nge', function(e) {
         if (document.fullscreenElement) {
            // Make sure the blockly area fills the entire screen
            document.fullscreenElement.style.height = "100%";
         }
      });
                    
      // Expand the blocklyArea element to fullscreen
      blocklyFullScreenRequest.call(blocklyArea[0]);
   })
}
  1. Show the Blockly editor in fullscreen mode.
  2. Try to enter a text in a text input field, or try to open a dropdown input.
  3. Nothing will happen …

Expected behavior

I expect in fullscreen mode that I can enter data into my blocks.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome, Firefox, Edge

Stack Traces

I don’t see any issues in my console log.

Additional context

Have spend some hours debugging the events of a colorpicker, but now I’m stuck …

Here is a demo animation for a color picker in normal (non-fullscreen) mode:

demo_normal

As you can see: the events (mouse, keydown, …) arrive nicely in Blockly. And as soon as the transform is executed, the color picker is displayed at the correct location.

But when we look at the demo for the same color picker in fullscreen mode:

demo_fullscreen

You can see that the colorpicker is NOT displayed after executing the transform statement. However when I open the color picker (variable “f” in above code) in the console, it seems to have the correct structure (i.e. seems identical to one in normal mode):

image

This means the color picker has the correct html structure, but this html elements don’t become visible after the transform statement.

So I thought that the parent element perhaps would be wrong, but in both modes the console shows that variable “f” has the (Node-RED) body element as parent:

image

Which means that in both modes the color picker should become available in the body. Don’t know if that is a problem in fullscreen mode, since the body is perhaps displayed BELOW the blockly editor (so the body is invisible)???

When I let my program run, at the end the color picker html elements will be added to the DOM tree in normal mode:

image

But at the end in fullscreen mode, the color picker html table is not available anymore:

image

That might be the reason why the color picker is not visible? But I have no clue why this html table is not added in fullscreen mode…

Hopefully somebody can help me, because this is way too far into depth for me 😭

Thanks a lot !! Bart Butenaers

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
samelhusseinicommented, Mar 30, 2020

This will be fixed in the upcoming release next week using:

Blockly.setParentContainer(...)

run before the initial inject.

0reactions
bartbutenaerscommented, Mar 30, 2020

Hi Rachel (@rachel-fenichel), Sam (@samelhusseini), Thanks again! Bart

Read more comments on GitHub >

github_iconTop Results From Across the Web

Input Textfields not working in fullscreen mode - Adobe Support ...
"Users cannot enter text in text input fields while in full-screen mode. All keyboard input and key-related ActionScript is disabled while in full-screen ......
Read more >
Can't type any letters or numbers in text inputs in fullscreen ...
Can't type any letters or numbers in text inputs in fullscreen mode on webkit browsers ; launchFullScreen(element) { if ; requestFullScreen(); } ...
Read more >
[Cards Form]: Full screen mode on web app (IOS) is not working
Hello,I'm trying to build form which would open on Ipad (mini) using web app - full screen mode using Add to home button...
Read more >
Document: fullscreenchange event - Web APIs | MDN
The event is sent to the Element that is transitioning into or out of fullscreen mode, and this event then bubbles up to...
Read more >
Game doesn't play in full screen - GameHouse Support
Note: If the game still opens in windowed mode, locate the full screen option within the games settings/options menu and ensure the box...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found