# How to focus a property field in an Operator dialog by default (v2.91)

This existing question has some answers that attempt to make a property field focused when it appears, but none of them seem to work in 2.91.

If you run the code below, you will see that the field is not selected, even though the "bl_property" value is set, per this documentation.

Here is my sample code (it is not currently useful, of course, just demonstrating the issue); the idea is to show a small window with a single property, and have that property focused:

import bpy
from bpy.props import *
theFloat = 0.0

class DialogOperator(bpy.types.Operator):
bl_idname = "object.dialog_operator"
bl_label = "Simple Dialog Operator"
bl_property = "my_float"

my_float: FloatProperty(name="Some Floating Point")

def execute(self, context):
global theFloat
theFloat = self.my_float
return {'FINISHED'}

def invoke(self, context, event):
global theFloat
self.my_float = theFloat
return context.window_manager.invoke_props_dialog(self)

def register():
bpy.utils.register_class(DialogOperator)

def unregister():
bpy.utils.unregister_class(DialogOperator)

if __name__ == "__main__":
register()

bpy.ops.object.dialog_operator('INVOKE_DEFAULT')