#StackBounty: #javascript #html #css #z-index #scaletransform Video and z-index inside scaled element: some divs disappear

Bounty: 50

I have a somewhat strange behaviour in Chrome and Safari. I have a scaled (transform: scale()) container with a video and other elements inside of it. At some scalings the absolute positioned elements with a high z-index disappears and does not come back again.


I have made an example that scales the outermost container up and down. At a specifik scale value the element with class .on-top (and text "I should always be on top.") disappears. When scaling down again it suddenly appears.

Link to exmaple: https://jsfiddle.net/iafiawik/Lcox1ecc/

enter image description here


  • It seems like the size of the element matters. The larger I make it, the larger is the scale value before it disappears.
  • I have also tested to set transform: scale(1.4) with CSS directly on the element and the behaviour is the same.

The issue does not exist if I:

  • Replace the video tag with a div
  • Remove position: absolute; from siblings to .on-top (that is, .below)
  • Remove overflow: hidden; from .content
  • If I move .on-top so it is placed after the video tag in the document flow


I have seen this issue in Chrome (Mac) and Safari (Mac).

Does anyone have a clue what I could do to prevent this from happening?

Get this bounty!!!

#StackBounty: #solidity #truffle #javascript #nodejs Truffle Framework "Block-scoped declarations not yet supported outside strict…

Bounty: 50

I have tried to install and use the Truffle Framework through npm on Elementary OS (Ubuntu distribution). There where no obvious issues with the installation but when running any command e.g. “truffle init” or “truffle unbox metacoin” I get the error:

!function(e,t){ true?module.exports=t():"function"==typeof define&&define.amd?define("ganache",[],t):"object"==typeof exports?exports.ganache=t():e.ganache=t()}(global,function(){return function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},a.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.w={},a(a.s=1222)}([function(e,t,a){try{var n=a(1);if("function"!=typeof n.inherits)throw"";e.exports=n.inherits}catch(t){e.exports=a(1208)}},function(e,t){e.exports=__webpack_require__(3)},function(e,t){e.exports=__webpack_require__(0)},function(e,t

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3

I assume this is some sort of compatibility issue with ES5/6. But I am unsure as to why this would happen with a fresh install.

Get this bounty!!!

#StackBounty: #javascript #jquery #html #datatables #codeigniter-3 How to filter data-tables using two or more dependent drop-down list?

Bounty: 50

I’m trying to apply filters to my data-table with drop-down list box which are dependent. But when i’m trying to select a value from drop-down, data-table takes value from only one drop-down.

Here is my code:


    var dataTable = $('#exampleProp').DataTable({
      "processing": true,
      "serverSide": true,
      "dom": 'lfrtip',
      "ajax": {
        "url": "",
        "dataType": "json",
        "type": "POST"
      "lengthMenu": [[50, 100, 200, -1], [50, 100, 200, "All"]],
      // "ordering": false,

    $('#areaId').on('change', function(){
      if (this.value == 1) {
        dataTable.search("Midlands & East of England").draw();
      } else {
        dataTable.search("North East, Yorkshire & Humberside").draw();
    $('#cluster_id').on('change', function(){
    $('#prop_type').on('change', function(){
    $('#prop_status').on('change', function(){


In this, Cluster is dependent on Area, but if I select Area, it filters using area only, and not by cluster.

Here is the code to pick a cluster list from database:

         var form_date =
          url: "<?= base_url('Property/clusterlistAddPropertyUse'); ?>",
          data: {areaId:$(this).val()},
          dataType: 'html',
              // $('#cluster_id option:selected').each(function(){
              // $(this).prop('selected', false);
              // });

Here is my view code:

<?php if($this->session->flashdata('success_msg')){ ?>
session->flashdata('success_msg'); ?>
<?php } ?> <?php if($this->session->flashdata('error_msg')){ ?>
session->flashdata('error_msg'); ?>
<?php } ?>
Property List
All area_id; ?>">area_name; ?>
All cluster_name; ?>
All property_type_name;?>
All stage_name; ?>
<!-- --> <!-- -->
Code Date Type ASYS Address1AreaCity Status Landlord Rooms Edit Action
Code Date Type ASYS No Address1AreaCity Status Landlord Rooms Edit Action

I want to filter data with both area and cluter and then type and stage also.


For more details, I’m adding Controller and model code here:



public function prop_query()
    # code...
    $this->db->select('property_id, property_code, property_added_date, property_updated_date, property_type, tbl_property_type.property_type_name as type, property_ASYS_no, property_address_1, property_area, tbl_area.area_name as area, property_cluster, tbl_cluster.cluster_name as cluster, property_status, tbl_property_stage.stage_name as stage, property_landlord_id, concat(tbl_landlord.landlord_first_name, tbl_landlord.landlord_middle_name, tbl_landlord.landlord_last_name) as landlord, property_postcode, count(tbl_rooms.room_property_id) as rooms,');

    $this->db->join('tbl_property_type', 'tbl_property.property_type = tbl_property_type.property_type_id', 'left');
    $this->db->join('tbl_area', 'tbl_property.property_area = tbl_area.area_id', 'left');
    $this->db->join('tbl_cluster', 'tbl_property.property_cluster = tbl_cluster.cluster_id', 'left');
    $this->db->join('tbl_property_stage', 'tbl_property.property_status = tbl_property_stage.stage_id', 'left');
    $this->db->join('tbl_landlord', 'tbl_property.property_landlord_id = tbl_landlord.landlord_id', 'left');
    $this->db->join('tbl_rooms', 'tbl_property.property_id = tbl_rooms.room_property_id', 'left');

    // $whereArray = array('tbl_property.property_type' => $propertyType, 'tbl_property.property_area' => $area, 'tbl_property.property_status' => $stageId, 'tbl_property.property_cluster' => '$clusterString');

    // $this->db->where('tbl_property.property_type', $propertyType);
    // $this->db->where('tbl_property.property_area', $area);
    // $this->db->where('tbl_property.property_status', $stageId);
    // $this->db->where('tbl_property.property_cluster', $clusterString);

    // $this->db->order_by("tbl_property.property_updated_date", "DESC");

    if (isset($_POST["search"]["value"])) {
        # code...
        $this->db->like("property_id", $_POST["search"]["value"]);
        $this->db->or_like("property_code", $_POST["search"]["value"]);
        $this->db->or_like("property_added_date", $_POST["search"]["value"]);
        $this->db->or_like("tbl_property_type.property_type_name", $_POST["search"]["value"]);
        $this->db->or_like("property_ASYS_no", $_POST["search"]["value"]);
        $this->db->or_like("property_address_1", $_POST["search"]["value"]);
        $this->db->or_like("tbl_area.area_name", $_POST["search"]["value"]);
        $this->db->or_like("tbl_cluster.cluster_name", $_POST["search"]["value"]);
        $this->db->or_like("tbl_property_stage.stage_name", $_POST["search"]["value"]);
        $this->db->or_like("concat(tbl_landlord.landlord_first_name, tbl_landlord.landlord_middle_name, tbl_landlord.landlord_last_name)", $_POST["search"]["value"]);
        $this->db->or_like("property_postcode", $_POST["search"]["value"]);

    if (isset($_POST["order"])) {
        # code...
        // $this->db->order_by("tbl_property.property_updated_date", "DESC");
        $this->db->order_by($this->order_column[$_POST['order']['0']['column']], $_POST['order']['0']['dir']);
    } else {
        # code...
        $this->db->order_by("tbl_property.property_updated_date", "DESC");
        // $this->db->order_by($this->order_column[$_POST['order']['0']['column']], $_POST['order']['0']['dir']);

public function prop_datatables()
    # code...

    if ($_POST["length"] != -1) {
        # code...
        $this->db->limit($_POST["length"], $_POST["start"]);

    $query = $this->db->get();

    return $query->result();

public function prop_filtered_data()
    # code...
    $query = $this->db->get();

    return $query->num_rows();

public function prop_all_data()
    # code...

    return $this->db->count_all_results();


public function fetchProp()
    # code...
    $user = $this->ion_auth->user()->row();
    $data['username'] = $user->username;

    $data['user_id'] = $user->id;
    $user_id = $user->id;
    $data['groupId'] = $this->l->groupId($user_id);
    $data['group'] = $data['groupId']['0']->group_id;

    $fetch_prop = $this->pm->prop_datatables();

    $data = array();

    foreach ($fetch_prop as $row) {
        # code...
        $sub_array = array();
        $sub_array[] = $row->property_code;
        $sub_array[] = $row->property_added_date;
        $sub_array[] = $row->type;
        $sub_array[] = $row->property_ASYS_no;
        $sub_array[] = $row->property_address_1;
        // $sub_array[] = $row->area;
        $sub_array[] = $row->cluster;
        $sub_array[] = $row->stage;
        $sub_array[] = $row->landlord;
        $sub_array[] = $row->rooms;


        // $sub_array[] = '<a style="text-decoration: none;" href="'.base_url('Property/propertyDetails/'.$row->property_id).'" class="btn-warning btn-xs">View</a>&nbsp;
        // <a style="text-decoration: none;" href="'.base_url('Property/viewRoom/'.$row->property_id).'" class="btn-success btn-xs">Rooms</a>';

        $data[] = $sub_array;

    $output = array(
        "draw" => intval($_POST["draw"]),
        "recordsTotal" => $this->pm->prop_all_data(),
        "recordsFiltered" => $this->pm->prop_filtered_data(),
        "data" => $data

    echo json_encode($output);

I’m gone through this link Data-Tables, But it gives result from columns from table only, I’m not showing area column in the table.


While googled, I got this link, Search API (regular expressions), Data table specific column filter with multi select drop down
, Individual column searching (select inputs)
, I’m trying to achieve result like this, But with Drop-down box.

Any kind of help is welcome. Thanks in advance.

Get this bounty!!!

#StackBounty: #javascript #jquery #reactjs #webpack #ecmascript-6 webpack use amd Define

Bounty: 50

Im trying to convert my company project, from JSPM and systemJS to webpack.
So i started a new project from scratch and instaled basic configuration.

I need to include in the project a old package that was build by former collegues. The package was develop in Jquery and use the AMD define method.

So i search and finded imports-loader.

In my webpack configuration i have:

      test: path.resolve(__dirname, 'vendor/module/module.js'),
      loader: "imports-loader?this=>window&define=>false"

And in my code i have the follow:

import Module from 'module';
new Module.WindowManager(arg1, arg2);

when i run the webpack, i got this error:

Uncaught Error: module/wm/window missing module/core/emitter

In the module that im trying to use the module/core/emitter are use here:

    ['module/core/emitter'], function (Emitter) { ... });

Get this bounty!!!

#StackBounty: #javascript #html #wysiwyg #summernote How to keep html attribute unchanged in wysiwyg editor?

Bounty: 50

In wysiwyg text editor source view, I have this simple html:

<span style="font-family: Moul;" {%if  loop.first=='first'%} first="" {%endif%}>Hello Text</span>

However, when I switch from source view to visual view, wysiwyg change my html code to this:

<span style="font-family: Moul;" {%if="" loop.first="='first'%}" {%endif%}="">Hello Text</span>

However, I would like to keep my html as it was without changing by text editor.

  height: 300
body {
  padding: 40px;
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.5.0/summernote.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.5.0/summernote-bs3.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css">

<textarea name="summernote" id="summernote" cols="30" rows="10">

I tried to used regular expression to help to keep wysiwyg from changing my html like this:

codeview = $('summernote').summernote('code');
Regx  =  /(<.*s*{%[^}]*%}.*s*>)/g;

But it still change my html during switching view between code view and visual view.

How can I do to keep my html unchanged from wysiwyg summernote editor? Thanks.

Get this bounty!!!

#StackBounty: #javascript #windows #html5 #mediastream Video stream sideways on Chrome on Windows Tablet in Portrait mode

Bounty: 50

I’m calling getUserMedia() to get a video stream and simply setting the stream as the srcObject of a video element.

Specifically on Chrome on 2 different Windows Tablets, in Portrait mode the video is side ways.

I can’t find any orientation info in the stream or video track objects and the width and height track info match the video element and are accurate to the aspect ratio track info.

You can duplicate with https://camera.stackblitz.io

How do I get the orientation info from the stream or logically rotate the video?


I do not want the orientation of the device or screen, but of the video stream. Maybe “rotation” is the right verbiage.

Get this bounty!!!

#StackBounty: #magento2 #javascript Magento 2 Missing JS function

Bounty: 50

Magento 2
Centos 7
Mariadb 10

When I try to add a product from the admin panel I get the spinning wheel of death.

import-handler.js:44 Uncaught TypeError: component.getPreview is not a function
at UiClass.<anonymous> (import-handler.js:44)
at Registry._resolveRequest (registry.js:418)
at Registry._addRequest (registry.js:385)
at Registry.get (registry.js:229)
at UiClass.<anonymous> (import-handler.js:43)
at underscore.js:73
at Function._.each._.forEach (underscore.js:145)
at UiClass.setHandlers (import-handler.js:40)
at UiClass.initialize (import-handler.js:27)
at UiClass.initialize (wrapper.js:109)

It seems like I am missing one or more JS files. I have cleared cache redeployed, done everything I think of to try to get back whatever file is lost.

Permissions have been set over and over and over.

Any idea how to find out what JS file or files is/are missing. If this is even the case.

Get this bounty!!!

#StackBounty: #javascript #three.js #easing Implement Damping (Inertia) to Panorama Rotation

Bounty: 50

I am aware of OrbitControls.js having a damping feature, which adds a smooth dragging of panorama, also known as easing. I want to implement the same functionality but without using this library. The reason is that I need to reduce amount of code used and get a tighter control of mouse or tap events.

I have built this Plunker to show the demo I use as a starter project for my panorama view.


In this demo I use mouse coordinates to convert to latitude/longitude values, which would adjust camera position. It is a basic panorama example on three.js site.

When I was playing around with damping from OrbitControls.js (see this line) I could not quite get the same smooth behavior – interaction caused panorama to jump around:

if ( scope.enableDamping === true ) {
    sphericalDelta.theta *= ( 1 - scope.dampingFactor );
    sphericalDelta.phi *= ( 1 - scope.dampingFactor );
    panOffset.multiplyScalar( 1 - scope.dampingFactor );

I do not believe I can fully understand how to apply it to my example in the plucker and what sphericalDelta is.

Can anyone guide me in the right direction applying damping to my example from Plunker?

Get this bounty!!!

#StackBounty: #javascript #angular #html5-video turn video frames to streaming video

Bounty: 50

The server is sending video frame. I would like to use them in order to do a streaming. I wonder how I could assemble the frames to create a streaming video. So far, I could display the frames as pictures. Below is my angular code

component angular

 getVideo() {
    interval(250).switchMap(() => this.appService.getPictures())
      .subscribe(data => {
        const file = new Blob([data], {type:'image/png'});
        this.url = this.sanitizer.bypassSecurityTrustResourceUrl(URL.createObjectURL(file));

template html

<img div="test" [src]="url" width="400px" height="300px"/>

I am trying to change the picture using the frame rate of the camera. But my picture is not updated and it freezes my browser due to the high number of http requests.

What I want to achieve is to buffer the frame in order to use the video tag instead of the img tag the same way I would connect to a live streaming send by a server using the video tag with src set to the url of the server.

Github link: https://github.com/kedevked/frameProcessing

Get this bounty!!!

#StackBounty: #javascript #node.js #selenium How can I build simple UI screen for end user for automation in Node Js

Bounty: 100

I am using Selenium webdriver, Javascript and Node JS to automate test cases. I have just wrote basic test case like :

var webdriver = require('selenium-webdriver');

var driver = new webdriver.Builder().

driver.findElement(webdriver.By.name('q')).sendKeys('simple programmer');

I can easily run above test case using command line node mytestcase.js

Now what I want it Give simple UI screen to end user where I want to put button foe ex: Automate Google search and as soon as user click on this button, test case will run automatically.

Is there any chance I can do above? I just need hint about how can I given simple UI screen to user to automate test cases by just clicking on button.

Get this bounty!!!