1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-02 08:57:19 -04:00

[view] try key events only when INSERT_MODE is ON

This commit is contained in:
Witold Filipczyk 2022-11-10 17:14:56 +01:00
parent ada4ebd842
commit 127b2f403b

View File

@ -1290,6 +1290,7 @@ try_form_action(struct session *ses, struct document_view *doc_view,
return FRAME_EVENT_IGNORED; return FRAME_EVENT_IGNORED;
#ifdef CONFIG_ECMASCRIPT #ifdef CONFIG_ECMASCRIPT
if (ses->insert_mode == INSERT_MODE_ON) {
std::map<int, xmlpp::Element *> *mapa = (std::map<int, xmlpp::Element *> *)doc_view->document->element_map; std::map<int, xmlpp::Element *> *mapa = (std::map<int, xmlpp::Element *> *)doc_view->document->element_map;
if (mapa) { if (mapa) {
@ -1310,6 +1311,7 @@ try_form_action(struct session *ses, struct document_view *doc_view,
if (status != FRAME_EVENT_IGNORED && !current_link_evhook(doc_view, SEVHOOK_ONKEYUP)) { if (status != FRAME_EVENT_IGNORED && !current_link_evhook(doc_view, SEVHOOK_ONKEYUP)) {
status = FRAME_EVENT_IGNORED; status = FRAME_EVENT_IGNORED;
} }
}
#endif #endif
if (status != FRAME_EVENT_IGNORED) { if (status != FRAME_EVENT_IGNORED) {
status = field_op(ses, doc_view, link, ev); status = field_op(ses, doc_view, link, ev);