Scriprunner + disable field working on edit but not inline

We are trying to set a field(issue type) readonly when another field is filled in. We achieved to do this with the Behaviour tab of Script Runner. But we see that on the edit screen this is working correctly but the inline value for the issuetype is still editable. Can we fix this?