when you click on the spell icon (not the "spells" button, the square button on the lower right corner) it display all spells, scrolls and staff you can use, as it should. but nothing happens when you click on the spell, all the icons just close but the spell isn't selected. you can select spell manually if you go through the "spells" menu but it do not work with the quick selection.
This is actually a lot harder problem than it looks. The game wasn't really designed for use on touchscreens.
It seems when you move the mouse, the event is not processed, it only saves the cursor coordinates somewhere for later, however when you "click", it handles it instantly, but doesn't really check where the click was. The mouse moves are processed in 50ms periodic updates instead (the game is locked at 20fps), which kind of makes sense as they probably wanted to avoid slowdowns when user moves the mouse wildly on old Pentium 60Mhz machines the game was designed to run on.
So when you tap on the touchscreen, the game reacts as if you clicked on the old cursor position, which pretty much makes the game unplayable on a touchscreen. With real mouse it's fine because you first drag the cursor on whatever you want to click on and periodic update kicks in before you click, most of the time at least. I was able to find a function responsible for selecting enemies and NPCs, so calling it manually on click events takes care of enemies and NPCs at least. I've also found the function for the spell bar, but calling that from event handler corrupts memory and crashes the game. Calling "full" periodic update is not an option and it's open coded into main game loop and there's no dedicated function that could be called.