Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Problem with on the %ZEN.Component.combobox

Question
Diones Forteski · Mar 29, 2018

Problem with <a href="#"> on the %ZEN.Component.combobox

For the browser to not update the screen and direct you to top after the onchange event of the combobox, just remove href="#" from the piece:
html[html.length] = '<tr id="item_'+n+'_'+this.index+'" class="comboboxItem" onmousedown="zenPage.getComponent('+this.index+').itemMouseDown(event,'+n+');" onmouseup="zenPage.getComponent('+this.index+').itemMouseUp(event,'+n+');"><td width="100%"><a href="#">'+text+'<\/a><\/td><\/tr>';


Of course to do this you'll have to customize the %ZEN.Component.combobox component and inherit it from %ZEN.Component.abstractComboBox.

This solved my problem with long pages and scroll.

#Caché #ZEN

Source URL:https://community.intersystems.com/post/problem-zencomponentcombobox