After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 699620 - annoying lowercasing
annoying lowercasing
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-05-03 18:43 UTC by Matthias Clasen
Modified: 2013-05-20 16:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
searchbar: Don't mess with the text input by the user (2.43 KB, patch)
2013-05-20 11:46 UTC, Debarshi Ray
accepted-commit_now Details | Review
searchbar: Don't mess with the text input by the user (2.08 KB, patch)
2013-05-20 16:03 UTC, Debarshi Ray
committed Details | Review

Description Matthias Clasen 2013-05-03 18:43:45 UTC
when I press shift + a to write upper-case a there is lower-case a written and cursor is moved all the way to the left. Is this because search is case insensitive ? The proper way to implement that is to compare case insensitively, but keep the user input unchanged. In any case, that cursor move is annoying.



Steps to Reproduce:
1.start g-d
2.press ctrl+f
3.press shift A
4. wait a sec
5. press shift B
  
Actual results:
ba in search field

Expected results:
I would expect AB there
Comment 1 Debarshi Ray 2013-05-20 11:46:41 UTC
Created attachment 244766 [details] [review]
searchbar: Don't mess with the text input by the user

The correct way would be to block/unblock the signal handler, but I could not figure out how to do that in JavaScript so this a workaround.
Comment 2 Cosimo Cecchi 2013-05-20 15:15:39 UTC
Review of attachment 244766 [details] [review]:

Thanks, looks good with these nitpicks fixed.

::: src/searchbar.js
@@ +23,3 @@
 const Gdk = imports.gi.Gdk;
 const GLib = imports.gi.GLib;
+const GObject = imports.gi.GObject;

Doesn't seem to be needed.

@@ +301,3 @@
         // connect to search string changes in the controller
+        this._searchChangedId = Application.searchController.connect('search-string-changed',
+                                                                     Lang.bind(this, this._onSearchStringChanged));

4-spaces indent for this line and below please.
Comment 3 Debarshi Ray 2013-05-20 16:03:14 UTC
(In reply to comment #2)
> Review of attachment 244766 [details] [review]:
> 
> Thanks, looks good with these nitpicks fixed.
> 
> ::: src/searchbar.js
> @@ +23,3 @@
>  const Gdk = imports.gi.Gdk;
>  const GLib = imports.gi.GLib;
> +const GObject = imports.gi.GObject;
> 
> Doesn't seem to be needed.

Done.

> @@ +301,3 @@
>          // connect to search string changes in the controller
> +        this._searchChangedId =
> Application.searchController.connect('search-string-changed',
> +                                                                    
> Lang.bind(this, this._onSearchStringChanged));
> 
> 4-spaces indent for this line and below please.

Done.
Comment 4 Debarshi Ray 2013-05-20 16:03:51 UTC
Created attachment 244829 [details] [review]
searchbar: Don't mess with the text input by the user
Comment 5 Debarshi Ray 2013-05-20 16:08:05 UTC
Thanks for the review.

Pushed to master and gnome-3-8.