Posts Tagged: ‘PHP’

Yii: GridView’s selectionChanged not working on iOS

13. Januar 2015 Posted by Sven Hasselbach

I had a strange issue with TbGridView‘s (YiiStrap‘s version of CGridView) selectionChanged event: In all browsers, the defined function was executed when a row was selected, but not on devices with iOS 7 & 8.

While trying to hack around the issue, I found a simple solution by adding

'htmlOptions' => array( 'onclick' => '' )

to the declaration of the grid. This little hack kills the inherited event handler from the body element by adding an empty onclick event to the generated <div>:

<div class="grid-view" id="yw0" onclick="">

Now everything works accross all browsers and devices.

Yii Framework: Security Fix for Version 1.1.14

1. Juli 2014 Posted by Sven Hasselbach

A security fix for the Yii framework was released on 29th June:

The issue only affects the CDetailView component of Version 1.1.14, and can be upgraded safely without breaking existing code.