Bug 247334 - [GTK] Add support for changing text alignment
Summary: [GTK] Add support for changing text alignment
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-01 14:02 PDT by Avid Seeker
Modified: 2023-08-27 12:54 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Avid Seeker 2022-11-01 14:02:09 PDT
Browsers like Firefox and Chromium (on Windows) have support for temporarily change text alignment of text boxes, typically by press RCtrl+RShift or LCtrl+LShift or by Ctrl+Shift+X to toggle alignment on Firefox Linux.

This feature (toggling RTL, LTR directions) is essential for Bidi support.

To clarify, this is not the same as setting attribute `direction="rtl";` in `<form>` tag. It only changes the direction "temporarily" for the user.
Comment 1 Radar WebKit Bug Importer 2022-11-08 13:03:24 PST
<rdar://problem/102104955>
Comment 2 Brent Fulgham 2022-12-12 09:33:16 PST
This seems to be a request for the Safari Web Browser, not for a feature of the WebKit engine. Passing this over to the Safari team and resolving as "MOVED".
Comment 3 Michael Catanzaro 2023-08-27 12:54:45 PDT
So, with additional context from https://gitlab.gnome.org/GNOME/epiphany/-/issues/2164, this is actually a Linux user, not a Safari user (but you had no way to know because, this wasn't mentioned). So, let's reopen this and reassign to WebKitGTK.

We surely don't expect WebKit clients to manually add custom keyboard shortcuts for reversing text alignment to every text entry (there's no straightforward way for applications to do that anyway), so that needs to be handled by WebKit itself. I guess applications could do it if WebKit were to provide a new editing command, but if WebKit is going to provide that, it might as well hook up a standard keyboard shortcut, same as it does for Cut, Copy, Paste, Undo, etc.

In the Epiphany bug there is an additional suggestion to add a context menu item. That would require exposing a new WebKitContextMenuAction.