Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Toggle "Single" hangs UI
#4
Hi @Tim Curtis,

I just wanted to see if I could gather some information on this, so tried to reproduce...

If I do this on the browser, from my laptop, everything seems to work, that is: I can toggle "single" without breaking the UI...

Then it hit me... suddenly, instead of clicking anywhere in the middle of the menu item (horizontally, I mean...) I clicked on the check-mark itself, and that broke the whole thing.
To confirm this, I just restarted the UI, and clicked on the check-mark of "Consume", which I keep active... BUM, UI crashed again.


So, it is clicking on the check-mark that crashes the menu handler somehow... debugging javascript I came across something weird... see this

The following is the last CASE statement of the function handling the popup-menu commands, and after clicking on the check-mark, the relevant CASE is executed (say, "single"), and then the execution steps on the lambda callback of the post command below... such php (recorder-cmd.php) does not exist, hence the default-cover-v6.svg, IMO...

The real problem being, though, how is it possible for the code to execute 2 case statements, providing the first IS terminated with BREAK???


Code:
case 'stream_recorder':
           $('#menu-check-recorder').toggle();
           if ($('#menu-check-recorder').css('display') == 'block') {
               SESSION.json['recorder_status'] = 'On';
               $('.playback-context-menu i').addClass('recorder-on');
           }
           else {
               SESSION.json['recorder_status'] = 'Off';
               $('.playback-context-menu i').removeClass('recorder-on');
           }
           $.post('command/cfg-table.php?cmd=upd_cfg_system', {'recorder_status': SESSION.json['recorder_status']}, function() {
               $.post('command/recorder-cmd.php?cmd=recorder_on_off');
           });

I'll have a look if it may appear to be a compressor/obfuscator issue...
Reply


Messages In This Thread
Toggle "Single" hangs UI - by Nutul - 04-18-2023, 09:13 PM
RE: Toggle "Single" hangs UI - by Tim Curtis - 04-18-2023, 09:23 PM
RE: Toggle "Single" hangs UI - by Nutul - 04-18-2023, 10:13 PM
RE: Toggle "Single" hangs UI - by Nutul - 04-19-2023, 10:16 AM
RE: Toggle "Single" hangs UI - by Tim Curtis - 04-19-2023, 12:51 PM
RE: Toggle "Single" hangs UI - by Nutul - 04-19-2023, 02:46 PM
RE: Toggle "Single" hangs UI - by Tim Curtis - 04-19-2023, 07:51 PM
RE: Toggle "Single" hangs UI - by Nutul - 04-19-2023, 08:26 PM

Forum Jump: