Commit Graph
331 Commits
Author SHA1 Message Date
daboe01 09c855daca fixed: preproc. leftovers 2026-10-25 17:41:02 +01:00
daboe01 3ad080b788 Merge remote-tracking branch 'upstream/main' into Aristo3 2026-10-24 22:00:51 +02:00
David Richardson 5b852ca765 AppKit: first method-definition gates removed (Increment A)
- CPTextField, CPTokenField, CPTextView: the PLATFORM(DOM) gates
  around _inputElement (superclass and override) and _cumulativeOffset
  are removed; the methods now exist under both targets with runtime
  CPDOMAvailable guards returning nil (object methods) or a zero
  point (struct method) when no DOM is present
- contract change: under CommonJS these methods change from absent to
  present-and-inert; all callers are browser event paths never
  exercised by the theme blender or nib2cib
- zero preprocessor directives remain in these three files
- work-in-progress towards complete removal of CPP directives
2026-10-01 16:03:10 -06:00
David Richardson eda11e38ba Merge main: Tests/Manual revival, functional fixes
Merges 71 commits from main. Headline content: the Tests/Manual
integration test suite revived and reorganized after long disuse
(renames, new applications, updated cibs), restoring a large
integration validation surface. Functional fixes include replacing
unload-based termination with pagehide (back/forward cache
compatibility) and hardening CPTextField's input-element handling.

Conflict resolutions (local versions retained):

- AppKit/CPTextField.j: main's input-element logic carried, with this
  branch's preprocessor-removal sweep re-applied on top. Main's
  conditionals are re-expressed as runtime CPDOMAvailable guards; the
  _inputElement method-definition gate is retained.

- AppKit/Platform/CPPlatform.j: the DOM platform implementation stays
  inlined under the PLATFORM(DOM) gate. The split layout breaks the
  legacy build: the include fragment is compiled standalone by the
  source walk and cannot resolve its superclass. Main's pagehide
  termination fix is ported into the inlined section; the restored
  AppKit/Platform/DOM/CPPlatform.j fragment is deleted.

Verified: legacy build green through Foundation, AppKit and Tools;
Tests/Manual suite passing.
2026-10-01 14:44:51 -06:00
daboe01 8a87077efe Merge remote-tracking branch 'upstream/main' into Aristo3 2026-09-28 14:51:57 +02:00
daboe01 87fd68504c fixed: NotFoundError race when moving the shared input element 2026-09-28 14:47:04 +02:00
David Richardson bc0bc7c68a AppKit: CPTextField PLATFORM conditional removal
- CPTextField.j: 14 PLATFORM blocks resolved; mechanical translation
  to runtime CPDOMAvailable guards (wrapped, compound, early-return,
  one runtime if/else); one site used a nonstandard directive
  spelling (#if PLATFORM (DOM), space before the parenthesis),
  normalized and resolved with the rest
- The method-definition gate around _inputElement remains, out of
  scope for this change
- work-in-progress towards complete removal of CPP directives
2026-08-21 15:34:50 -06:00
daboe01 69c8c3d0a2 Merge remote-tracking branch 'upstream/main' into Aristo3 2026-07-25 19:26:39 +02:00
David Richardson 1a9a42ff54 Replace #pragma mark with // MARK:
Replace objc directive with native Javascript version // MARK: to facilitate elimination of preproccsing pass.
2026-07-21 15:15:53 -06:00
daboe01 0597e477ae Merge remote-tracking branch 'upstream/main' into Aristo3 2026-06-16 19:46:20 +02:00
daboe01 cfff603508 Fixed: CPInvalidArgumentException in CPTextField -setFont: when handling composite theme states 2026-06-16 19:43:45 +02:00
daboe01 45bd822c28 Merge remote-tracking branch 'upstream/main' into Aristo3 2026-06-16 19:31:19 +02:00
daboe01 524b1df4c9 fix font issue 2026-06-05 17:38:04 +02:00
daboe01 d64966594d Merge remote-tracking branch 'upstream/main' into Aristo3 2026-05-30 15:12:50 +02:00
daboe01 c3d9dead19 Merge pull request #3192 from daboe01/fixed-CPControlTextDidBeginEditingNotification-is-not-correctly-triggered
Fixed: timing of CPControlTextDidBeginEditingNotification (#1941)
2026-05-30 15:09:34 +02:00
daboe01 93736b7ba9 Merge remote-tracking branch 'upstream/main' into Aristo3 2026-03-11 06:29:57 +01:00
daboe01 d0d7033f63 Fixed: timing of CPControlTextDidBeginEditingNotification (#1941) 2026-03-07 14:53:44 +01:00
daboe01 9aaa565657 fixed: accidental code spillover 2026-03-07 14:40:34 +01:00
daboe01 837df80b64 fixed: accidental code spill over 2026-03-07 14:33:31 +01:00
daboe01 f7a27cf905 fixed: delegate method was called more than once by textfield 2026-03-07 14:26:51 +01:00
daboe01 39fb7c6b5b formatting 2026-02-03 08:20:15 +01:00
daboe01 0fa2b62cc9 fixed: text jumping issues on FF 2026-02-03 07:14:20 +01:00
daboe01 77063efe58 Merge remote-tracking branch 'upstream/main' into Aristo3 2026-01-28 21:01:46 +01:00
daboe01 e198fbdc40 Merge pull request #3122 from daboe01/fixed-keycode-management-in-cptextview
fixed: Keyboard-event handling is based on the deprecated charCode
2026-01-28 20:57:07 +01:00
daboe01 f3392c7df1 fixed: RuleEditor was not functional 2026-01-24 16:55:26 +01:00
daboe01 0bd0dc6216 fixed: diverse HUD issues 2026-01-11 00:04:12 +01:00
daboe01 568d0faef6 fixed: missing parameter to CPEvent initializer 2025-08-06 17:19:14 +02:00
daboe01 23f9170b90 fixed: nonsense addition accidentally turning the size into a string 2025-06-29 17:18:42 +02:00
Martin Carlberg edfba15d6f Merge branch 'master' into node 2022-03-21 15:55:08 +01:00
daboe01 f21555bb6c Fixed: Width of text sizing was slightly off in chrome due to a Chrome bug (#2975)
This is a real bug in chrome. see https://bugs.chromium.org/p/chromium/issues/detail?id=1192834

Also fixed: ellipsis clipping in segmented controls
and
fixed: tooltip wrapping issues from fractional pixels
2022-03-21 14:08:45 +01:00
Martin Carlberg d72a52b9ce Merge branch 'master' into node 2021-12-03 12:36:27 +01:00
Alfred Wärnsäter 2ecea40fdc lots of Node fixes 2021-08-19 10:56:13 +02:00
Didier Korthoudt 4b28d0c38b Fixed: setTextColor on a CPTextField would not take visual effect before an event (#2993) 2021-08-06 12:17:07 +02:00
Didier Korthoudt 9145e27009 Fixed: Aristo3 CSS theme ready and replaces setTextFieldBackgroundColor by setBackgroundColor for CPTextField (#2925) 2020-10-02 14:47:50 +02:00
Didier Korthoudt 617987f4a5 Fixed: CPTextField forced height to 29 instead of using theme value min-size (#2688) 2020-03-17 09:14:25 +01:00
daboe01 5bb338d6ec New: CPTextField now supports the CPEditorRegistrationProtocol (#2169) 2020-03-11 10:30:00 +01:00
Didier Korthoudt 3a51c386ca Fixed: Before this PR, a click in a not first key responder CPTextField would misplace the caret if text alignment was not CPLeftTextAlignment #2887
Adapts the calculation of where in the textfield text the mouse is clicked to take in account the text alignment
2020-03-03 17:02:42 +01:00
Martin Carlberg 7dc77ed609 Fixed: Make sure we handle undefined when testing for nil values (#2862) 2020-01-31 13:43:58 +01:00
Martin Carlberg 11639af26e Fixed: Let the text field handle key commands when it is selectable. (#2868)
There was a problem introduced by pull request #2600 when trying to select and copy text in a selectable text field.
The problem only occurs when the text field is in a modal window.

It was caused by the modal run loop that is present as an eventListener on the CPApplication when in modal mode. It will
force a bail out from the sendEvent: method in CPApplication when trying to handle the event. As the check for key
equivalent is moved down by the #2600 pull request it will never be allowed to handle a copy command from the browser
menu or key equivalent.

The solution is to allow the text field to handle the event if it is selectable. This will also allow the text selection
to be altered from the keyboard with keys like shift-left/right/up/down arrow. Combinations like shift-option arrow also
work for whole word selection.
2019-11-26 09:20:47 +01:00
daniel c245d9de80 Formatting: Removed redundant semi-colon in CPTextField 2019-03-28 14:55:44 -07:00
Didier Korthoudt 8a3eb0d83b FIXED: This PR fixes a side effect of #2744 on table data views (#2767)
When a textField is used in a tableView, setValue forThemeAttribute
should refer to state CPThemeStateTableDataView instead of
CPThemeStateNormal as #2744 is now more accurate on states.
2018-08-31 09:14:54 +02:00
Didier Korthoudt ad9d8a7200 FIXED: When attaching an externally owned tracking area to a view, view tracking areas were not correctly handled (#2681)
This PR also removes the -removeAllTrackingAreas method.
2018-05-28 20:44:31 +02:00
daniel 01a1e506e4 Formatting: add missing semi-colons to CPTextField.j 2018-04-04 15:08:21 -07:00
daboe01 b3ddd85b09 Fixed: Editing text in tableviews throws DOM exceptions under certain conditions in Chrome (#2563)
Previosly, we unflagged ```CPTextFieldInputDidBlur``` and ```CPTextFieldInputResigning``` before
the call to removeChild. This resulted in DOM exceptions in Chrome under certain conditions.
See https://stackoverflow.com/questions/21926083/failed-to-execute-removechild-on-node for
why we need to unflag ```CPTextFieldInputDidBlur``` and ```CPTextFieldInputResigning``` only after removing the element.

This apply to token fields also but with the corresponding flags. Also token fields now have the same behavior as the text field when bluring etc.
2018-03-08 09:17:15 +01:00
Alexander Ljungberg 26aab2961b New: iOS Safari virtual keyboard "Done" button support.
Without this change, clicking the done button in iOS Safari would dismiss the virtual keyboard but then it would immediately come back (as we forced a refocus).

The fix is to no longer force a refocus since it turns out we don't need to anymore given another previous fix.
2016-08-19 13:07:43 +01:00
Alexander Ljungberg 7f3c2176f8 Fix typos. 2016-08-18 23:52:10 +01:00
Alexandre Wilhelm 1927bb4798 Merge pull request #2452 from didierkorthoudt/CPTextField-tracking-area-optimization
Fixed: CPTextField doesn't optimize tracking areas management
2016-06-07 12:07:11 -07:00
Didier Korthoudt aebd28dbef CPTextField and CPTrackingArea: optimization and cursor management. 2016-05-18 11:09:06 +02:00
Aparajita Fishman 8f1191733b Fixed race condition when editing table cells
Previously, when double-clicking on a table cell to edit it, there was a possibility of a race condition. A refresh of the display was requested, then the run loop was passed through once. But it was possible for the display refresh to not be queued when the run loop was passed through, in which case the refresh would cancel the editing. Or at least I think that's what was happening.  ;-)

This commit (hopefully) eliminates the race condition by synchronously refreshing the layout and display.

Made some miscellaneous formatting fixes as well.
2016-01-19 23:12:11 -08:00
Alexandre Wilhelm 78e29d2bbf Fixed: position of cursor in a CPTextField was wrong when becoming firstResponder
Previously, when a CPTextField became firstResponder, the cursor was always set at the first position. Now it position it at the expected location.
2015-10-31 12:31:49 -07:00