In dropdown mode first can't be selected and links are incorrect (fix provided)
-
When script is enabled, there is no Go button. The first item in the list is already selected, so no onchange event fires when you choose it, so you can’t get to that item.
Also, you have links available but you’re forcing the use of page ID for for the URL.
This can be fixed in
flexipages_dropdown()
by changing to this line:$page_dropdown .= str_repeat("\t", $depth+1).'<option class="level-'.$level.'" value="'.htmlspecialchars($page['link']).'"'.$selected.'>'.str_repeat(" ", $level).$page['title'].$date.'</option>'."\n";
And in
flexipages()
modify the start of the<select>
:$pages = "<form action=\"". get_bloginfo('url') ."\" method=\"get\">\n<select name=\"page_id\" id=\"page_id\" onchange=\"if(this.selectedIndex)top.location.href=this.options[this.selectedIndex].value;\">"; $pages .= '<script type="text/javascript">document.write(\'<option value="">\' + '.json_encode(__('Select', 'flexipages')).' + \'<\/option>\');</script>';
This would also resolve this issue.
- The topic ‘In dropdown mode first can't be selected and links are incorrect (fix provided)’ is closed to new replies.