Pressing the "x" in address bar of example creates strange behavior

Bug #1153938 reported by Kevin Wright
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
U1DB Qt/ QML
Fix Committed
Low
Kevin Wright

Bug Description

In examples/u1db-qt-example-3.qml the user can enter the docId of a document in the database into an address bar (represented by a TextField component).

If the document already exists then the content of that document is displayed in a text area below the address bar. If a document with that docId does not exist it is then created, with default textual content, and made the active document. The user can then begin to navigate forwards and backwards in the database using two buttons on the user interface.

However, if the 'x" in the address bar is used to clear the text the example starts to exhibit strange behavior. Even when a known docId is then entered into the address bar it is then no longer possible to navigate backwards and forwards in the database, even though multiple document records exist in it.

This use case was not considered during development of the example and it is probable that the issue is with the logic in the example code itself rather than the TextField component. Clearing the field is not critical to the example, so if there is a way to turn that feature off then that is the best fix.

Related branches

Revision history for this message
Kevin Wright (kevin-wright-1) wrote :

Resolved by removing clear button from address bar in u1db-qt-example-3.qml (TextField component's hasClearButton : bool property set to false). Awaiting merge.

Cris Dywan (kalikiana)
Changed in u1db-qt:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.