Menu

Having every bit of information defined at every aspect of application makes system actually finished.
Piotr Masełkowski, Maslosoft Founder

jQuery UI jumping sortable items

Sometimes when creating sortable user interface widgets, some various quirks might happen. One of these is that just after starting dragging element, it jumps of from original location. Element will move above cursor for roughly height of it's parent container minus one sortable element.

There are plenty solutions including JavaScript to fix container height. These are clunky as it need to be assigned to each sortable. Even more problematic when used with Knockout JS sortable, as including JavaScript in HTML attributes is not pretty and really not recommended.

I turned out that properly styled container will remedy jumping issue. The point is to make it's overflow auto:

.my-sortable-container{
    overflow: auto;
}

That's it! Now sorted item should not jump anymore. Credits goes to: http://stackoverflow.com/a/24122186/5444623

Selenium bad magic number error

Using selenium for acceptance tests?

It usually run fine, until I got bad magic number error when trying to run any version:

invalid file (bad magic number): Exec format error

It is quite confusing message, basically it means that it cannot be executed. Solution is to execute it using java with -jar option:

java -jar selenium-server-standalone-3.0.1.jar

To make it easier, selenium bootstrap file can be created to launch it:

#!/bin/bash
java -jar selenium-server-standalone-3.0.1.jar
This file can be named, for example /usr/local/bin/selenium with jar file located in same directory.

Using composer with Xdebug on ubuntu

Using composer with Xdebug turned on will result in warning message, saying that Xdebug affects performance - and that's true. Composer will run much slower when used with Xdebug enabled. To overcome this issue, it is possible to disable Xdebug when using composer command.

Note that following steps are meant to be used only on development machine, do not use on production servers!

To turn on and off Xdebug, we will use bash script - which will link or unlink Xdebug configuration - as just disabling Xdebug in config still degrades performance.

Modernized website

As a lot of development effort were put into many Maslosoft's projects, this website was left behind.

Now it's time to keep up, so a highly redesigned system along with content was deployed. This includes documentation for many projects and blog You are reading now. But the most exciting part is a bit of knowledge about quite mature projects developed since... Who knows when.

As an incorrigible optimist, still creating software resulting in comfortable web editing, as it's my point of interest from ages.