|
bool PopupListBox::handleKeyEvent(const
WebCore/platform/chromium/PopupMenuChromium.cpp_sec1
|
| 751 |
if (event.windowsVirtualKeyCode() == VKEY_TAB) { |
751 |
if (event.windowsVirtualKeyCode() == VKEY_TAB) { |
| 752 |
// TAB is a special case as it should select the current item if any and |
752 |
// TAB is a special case as it should select the current item if any and |
| 753 |
// advance focus. |
753 |
// advance focus. |
| 754 |
if (m_selectedIndex >= 0) |
754 |
if (m_selectedIndex >= 0) { |
| 755 |
m_popupClient->setTextFromItem(m_selectedIndex); |
755 |
acceptIndex(m_selectedIndex); // may delete us. |
|
|
756 |
// Return false so the TAB key event is propagated to the page. |
| 757 |
return false; |
| 758 |
} |
| 756 |
// Call abandon() so we honor m_acceptedIndexOnAbandon if set. |
759 |
// Call abandon() so we honor m_acceptedIndexOnAbandon if set. |
| 757 |
abandon(); |
760 |
abandon(); |
| 758 |
// Return false so the TAB key event is propagated to the page. |
761 |
// Return false so the TAB key event is propagated to the page. |