[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
** Changed in: oxide Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
** Changed in: oxide Status: Confirmed => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
The real cause here is we rely on focusOut(In)Event to check for activeFocus item. but the any check of ActiveFocus (hasActiveFocus or window->activeFocusItem) inside focusout/in event give incorrect result. when another item is focused(location bar), window->activeFocusItem() return null not the new activeFocus Item. While check for activeFocus item is consistent Once we get ItemChanged event. http://doc.qt.io/qt-5/qquickitem.html#itemChange So When quickItem activeFocus changes we get ItemChange event and after any check window->activeFocusItem() correctly return the newly focus QuickItem. In short, we should do webview focus update based on ItemChange event. see previous comments also for more on activeFocus behaviour inside focusout/in event. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
** Changed in: oxide Milestone: branch-1.20 => branch-1.21 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
Re-opening as the change had to be reverted because it caused a regression (bug #1649577). ** Changed in: oxide Status: Fix Released => Confirmed ** Changed in: oxide Milestone: branch-1.19 => branch-1.20 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
** Changed in: oxide Milestone: None => branch-1.19 ** Changed in: oxide Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
FIxed with https://code.launchpad.net/~santoshbit2007/oxide/+git/oxide/+merge/301475 ** Merge proposal linked: https://code.launchpad.net/~santoshbit2007/oxide/+git/oxide/+merge/301475 ** Changed in: oxide Status: In Progress => Fix Committed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
Ready for review: ttps://code.launchpad.net/~santoshbit2007/oxide/+git/oxide/+merge/301475 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
** Changed in: oxide Status: Triaged => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
QQuickWindow::activeFocusItem() is fine , I was just doubtful with it being null. I am going to patch it with using same -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
Whatever we do, we should stop using QQuickItem::hasActiveFocus() for the reason outlined in comment 8. I don't understand the issue with QQuickWindow::activeFocusItem() though - it looks like it's cleared to nullptr before a focus out event and initialized to the new focus item before a focus in event. It sounds like exactly what we want. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
Could bug #1566373 be related? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
QQuickWindow::activeFocusItem will still be tricky. There seems to be fundamental issue with focus events sent. FocusEvent are only sent to Item when its activeFocus = true; So when we focus is removed from item it won't immediately set activeFocus=false(since item won't get focus event then). What is does is, first send focusOutEvent to item, then set activeFocus = false; And when webview is clicked we forcefully need to set activeFocus=true(item_->forceActiveFocus in handleMousePress). then item is eligible to receive focusInEvent. In short activeFocus is updated after focusOutEvent and before focusInEvent. In this way In focusOutEvent both activeFocus and QQuickWindow::activeFocusItem both are not upated, QQuickWindow::activeFocusItem is specifically nullptr -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
** Changed in: oxide Status: Confirmed => Triaged ** Changed in: oxide Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
I think I'd prefer to just use QQuickWindow::activeFocusItem in oxide::qquick::ContentsView::HasFocus(). From looking at the code, I don't even think that QQuickItem::hasActiveFocus has the correct semantics as it will indicate active focus for ancestors of the active focus item which isn't really what we want (ie, if an application adds another item as a child of the webview, we shouldn't think we're actively focused if the child item is the active focus item). We should really add some integration tests for these cases in qt/tests/qmltests/web_platform -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
it seems focusOutEvent comes too early to QQuickItem. by that time activefocus is not updated, so it still holds earlier value. Once activeFocus of QQuickItem is changed we get ItemChanged(http://doc.qt.io/qt-5/qquickitem.html#ItemChange-enum). I tested it OxideQQuickWebView::itemChange has correct value of activeFocus. Inside: itemChangeItemChange : 6 Value : 0 // 6 represent QQuickItem::ItemActiveFocusHasChanged ActiveFocusItem : 0 So I was wondering if we should move focus handling inside OxideQQuickWebView::itemChange OR tweak HasFocus() -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
(after looking at QQuickWindowPrivate::setFocusInScope) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
I suspect that oxide::qquick::ContentsView::HasFocus also needs to verify that item_ == item_->window()->activeFocusItem() (http://doc.qt.io/qt-5/qquickwindow.html#activeFocusItem-prop). It looks like this is cleared before dispatching QQuickItem::focusOutEvent(), whereas QQuickItemPrivate::activeFocus isn't. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
I think I know where the issue is: when the OxideQQuickWebView is getting a focusOut event, it’s calling WebContentsView::FocusChanged(), which checks whether the view has focus by calling WebContentsView::HasFocus(), but at this point it returns true. ** Changed in: webbrowser-app (Ubuntu) Status: New => Invalid ** Changed in: oxide Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
Olivier Surprising it is, I was checking from oxide side, and QQuickWeview activeFocus is set to true. So I was doubting issue in webbrowser-app -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
I can reliably reproduce the bug on my desktop. I have instrumented the browser to print a debug statement every time the activeFocus property of the WebView changes (in Browser.qml): WebViewImpl { onActiveFocusChanged: console.log("webview.activeFocus =", activeFocus) } And indeed when I focus the address bar, webview.activeFocus becomes false. Could it be an issue in oxide? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1599771] Re: Webview appears to think it's in focus when typing in the addressbar
** Changed in: oxide Assignee: (unassigned) => Santosh (santoshbit2007) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1599771 Title: Webview appears to think it's in focus when typing in the addressbar To manage notifications about this bug go to: https://bugs.launchpad.net/oxide/+bug/1599771/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs